develop
HerrHase 2 years ago
parent c4ba30213f
commit 443145063f

@ -5,7 +5,9 @@ date_published: "10.10.2022"
excerpt: "ddd"
meta:
description: "DSA yes plz hot chicken green juice"
tags:
- f
---
## Normcore cold-pressed ramps DSA
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.
Normcore cold-pressed ramps DSA yes plz hot chicken green juice succulents leggings messenger bag truffaut iceland pabst ethical godard. Semiotics air plant marfa, drinking vinegar authentic iceland pug fit cloud bread cronut kickstarter glossier crucifix tumeric. Chicharrones polaroid flexitarian, seitan lumbersexual viral fam master cleanse four dollar toast scenester. Succulents poutine vegan keffiyeh meh, health goth DIY tattooed. Praxis roof party celiac chartreuse banjo butcher you probably haven't heard of them schlitz beard. Ethical tattooed kinfolk, cliche vegan messenger bag mukbang dreamcatcher cloud bread farm-to-table gatekeep trust fund.

@ -2,7 +2,7 @@
{% block main %}
{% set posts = pageQuery.find({ orderBy: [ '-date_published' ], limit: 2, filter: { view: { _eq: 'post.njk' } } }) %}
{% set posts = pageQuery.find({ orderBy: [ '-date_published' ], limit: 2, filter: { tags: { _in: [ 'tok', 'xxx' ] } } }) %}
{% for post in posts %}
<a class="post" href="{{ post.path }}">
@ -12,4 +12,4 @@
</a>
{% endfor %}
{% endblock %}
{% endblock %}

@ -3,7 +3,8 @@
{% if (site.https) %}
{% set http = 'https' %}
{% endif %}
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
@ -47,4 +48,4 @@
</item>
{% endfor %}
</channel>
</rss>
</rss>

@ -57,9 +57,8 @@ class Engine {
/**
* render
*
* @param {string} view
* @param {object} data
* @return {string}
* @param {object} page
* @param {function} done
*
*/
render(page, done) {
@ -77,7 +76,7 @@ class Engine {
const options = configStore.get('options')
// if options minifyHtml is set, minify html
// if options minifyHtml is set, minify html, but only if page has type html
if (options.minifyHtml === true && data.page.type === 'html') {
response = minify(response, {
removeComments: true,
@ -85,6 +84,8 @@ class Engine {
keepClosingSlash: true,
removeOptionalTags: false
})
// remove empty lines
} else {
response = response.replace(/^(?:[\t ]*(?:\r?\n|\r))+/gm, '')
}

@ -75,22 +75,44 @@ class Pages {
let isValid = true
for (const [key, value] of Object.entries(options.filter)) {
// equal
if (value['_eq'] && result[key] !== value['_eq']) {
isValid = false
}
if (value['_neq'] && result[key] === value['_eq']) {
// not equal
if (value['_neq'] && result[key] === value['_neq']) {
isValid = false
}
/**
// in
if (value['_in'] && Array.isArray(value['_in'])) {
if (value['_in'] && value['_in'].indexOf(result[key]) !== -1) {
isValid = false
}
// if result no exists
if (!result[key]) {
isValid = false
}
if (value['_nin'] && value['_nin'].indexOf(result[key]) === -1) {
isValid = false
if (Array.isArray(result[key])) {
let found = false
result[key].forEach((v, index) => {
if (value['_in'].indexOf(v) !== -1) {
found = true
}
})
if (!found) {
isValid = false
}
} else {
if (value['_in'].indexOf(result[key]) === -1) {
isValid = false
}
}
}
if (value['_lt'] && result[key] < value['_lt']) {
@ -105,7 +127,7 @@ class Pages {
isValid = false
}
if (value['_gte'] && result[key] >= value['_gt']) {
if (value['_gte'] && result[key] >= value['_gte']) {
isValid = false
}
@ -116,18 +138,6 @@ class Pages {
if (value['_nnull'] && !result[key]) {
isValid = false
}
if (value['_contains'] && !result[key]) {
isValid = false
}
if (value['_ncontains'] && !result[key]) {
isValid = false
}
if (value['_regex'] && result[key].test(value['_regex'])) {
isValid = false
}*/
}
return isValid
@ -271,4 +281,4 @@ class Pages {
}
module.exports = Pages
module.exports = Pages

@ -2,7 +2,7 @@ const Siteomat = require('./src/siteomat.js')
const siteomat = new Siteomat('./example/site', './example/views', {
'destination': './public',
'minifyHtml': true
'minifyHtml': false
})
siteomat.run()
siteomat.run()

Loading…
Cancel
Save