Yet another static generator, here to help you with more concrete use cases than just your personal blog.
JSON files inside data folder get parsed now, e.g.:
/
|- data
|- posts.json
|- authors.json
Get parsed into the data
object:
data: {
posts: [ ... ],
authors: [ ... ]
}
Note: data is parsed as is. Intended use case is to have structured data outside of the Markdown docs case.
Updates deps.
Introduces utils.relativisePath
in order to have a platform agnostic path resolver.
It is possible now to pass configuration params via constructor:
wfl = new Waffel
config:
env: 'dev'
Notice: they will be overridden by whatever found in site.yml
of course.
Memoize loc()
for performance.
Fix loc()
helper.
It is possible to use loc()
as a filter, useful when chaining filters on array/collections, e.g.:
{% for posts in data.posts | toArray | loc(page.language) | where({ 'published' : true }) %}
# here you have the localised, filtered post
{% endfor %}
Notice: you have to explicitly pass the language to the filter.
Is it now possible to Add pageLimit
parameter to site pages [see #4 ].
First stable version is here! This implies a lot of good things:
npm run test
and crossing fingers.