Releases: patrickarlt/acetate
Releases · patrickarlt/acetate
v1.1.0
Added
- The
{% link %}
helper now accepts a newcurrentUrl
option for resolving the URL and active state. This allows{% link %}
to be used in macros where the current page context cannot be accessed.
v1.0.2
Fixed
- Switch back to a syncronous loader for Nunjucks that is more reliable.
v1.0.1
Fixed
acetate.query
now works properly.
v1.0.0
Added
require
option to the CLI which lets you require tools likebabel-register
before executing Acetate.acetate.prerender(pattern, func)
helper which will run an async function before rendering pages whosesrc
matches the supplied pattern.acetate.generate(func)
helper to asyncronously generate pages.func
getspages
,createPage
andcallback
.acetate.require('path')
helper to require another configuration file. This allows splitting configs up across files and also supports loading files fromnode_modules
.- Dev server will now display errors from Acetate in both the console and as a fullscreen message in the browser.
- Page metadata will appear in the console when using the dev server.
Changed
acetate.transform
has changed it nowacetate.transform(pattern, transformer)
wherepattern
is a glob pattern andtransformer
is a function the gets apage
and returns apage
. It show gets a singlepage
argument and should return that page after manipulating it. To Asyncronsouly alter pages matching a pattern useacetate.transformAllAsync
which gets an array of allpages
and acallback
which takeserror
and the altered array of pages.- Pages no longer have a
dirty
flag. This makes rendering stateless and more predictable. However this may break some existing extensions that rely ondirty
. To preform async actions when the page is "dirty", useacetate.prerender
which will run before the page renders. - The
context
in helpers has changed. It is now an object withpage
andoptions
.options
are the Nunjucks keyword arguments. - Output from helpers is automatically considered safe and escaped. This makes it easier to return HTML from helpers.
acetate.nunjucks
andacetate.markdown
are now located under the rendereracetate.renderer.nunjucks
,acetate.renderer.markdown
acetate.data
no longer accepts a path to a Common JS module. Instead pass a function that will recive acallback
with acallback(error, data)
signature.- Pages no longer can use the
data
key in their metadata to load data onto the page. Instead load all data with theacetate.data()
helper. acetate.query
has changed it is nowacetate.query(name, filter, map, reduce, inital)
and functions like a map/reduce query over a filtered array of pages.- Pages can no longer use the
query
key in their metadata to retrive queries. All queries are now global. - You can now specify layouts, Nunjucks
{% include %}
,{% extends %}
and{% import %}
tags with a file extension. - Acetate no longer loads
**/*.+(html|md)
by default. Addacetate.load('**/*.+(md|html)')
to the top of your config file.
Removed
acetate.use
. Replace withacetate.transformAllAsync
. You can no longer manipulate the state of theacetate
object, only the pages.acetate.output
. Replaced withacetate.generate
.
Fixed
- Filters added with
acetate.filter
can now accept arguments. - Lots of strange behavior with the dev server, watcher and reloading configuration files.
Misc.
- Tests have been rewritten with AVA
- Linting is now done by ESLint with the ESLint recommended rules and Semistandard
v0.4.11
Fixed
- Queries are re-run whenever they are accessed to ensure the latest page data.
v0.4.10
Fixed
- Proper MIME types for Markdown documents.
v0.4.9
Added
- Added
https-cert
andhttps-key
as CLI options to allow for custom SSL certificates while developing.
v0.4.8
Changed
info
log level is now less verbose- Server now re-renders pages on every request, not just when the source file changes.
Changed
v0.4.7
Fixed
- Restore unintentional change to metadata merging.
v0.4.6
Fixed
- Restore unintentional change to metadata merging.