Skip to content

Releases: patrickarlt/acetate

v1.1.0

24 Oct 18:26
Compare
Choose a tag to compare

Added

  • The {% link %} helper now accepts a new currentUrl 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

19 Aug 00:37
Compare
Choose a tag to compare

Fixed

  • Switch back to a syncronous loader for Nunjucks that is more reliable.

v1.0.1

21 Jun 21:35
Compare
Choose a tag to compare

Fixed

  • acetate.query now works properly.

v1.0.0

21 Jun 20:34
Compare
Choose a tag to compare

Added

  • require option to the CLI which lets you require tools like babel-register before executing Acetate.
  • acetate.prerender(pattern, func) helper which will run an async function before rendering pages whose src matches the supplied pattern.
  • acetate.generate(func) helper to asyncronously generate pages. func gets pages, createPage and callback.
  • acetate.require('path') helper to require another configuration file. This allows splitting configs up across files and also supports loading files from node_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 now acetate.transform(pattern, transformer) where pattern is a glob pattern and transformer is a function the gets a page and returns a page. It show gets a single page argument and should return that page after manipulating it. To Asyncronsouly alter pages matching a pattern use acetate.transformAllAsync which gets an array of all pages and a callback which takes error 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 on dirty. To preform async actions when the page is "dirty", use acetate.prerender which will run before the page renders.
  • The context in helpers has changed. It is now an object with page and options. 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 and acetate.markdown are now located under the renderer acetate.renderer.nunjucks, acetate.renderer.markdown
  • acetate.data no longer accepts a path to a Common JS module. Instead pass a function that will recive a callback with a callback(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 the acetate.data() helper.
  • acetate.query has changed it is now acetate.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. Add acetate.load('**/*.+(md|html)') to the top of your config file.

Removed

  • acetate.use. Replace with acetate.transformAllAsync. You can no longer manipulate the state of the acetate object, only the pages.
  • acetate.output. Replaced with acetate.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.

v0.4.11

21 May 15:57
Compare
Choose a tag to compare

Fixed

  • Queries are re-run whenever they are accessed to ensure the latest page data.

v0.4.10

29 Apr 05:52
Compare
Choose a tag to compare

Fixed

  • Proper MIME types for Markdown documents.

v0.4.9

23 Apr 02:47
Compare
Choose a tag to compare

Added

  • Added https-cert and https-key as CLI options to allow for custom SSL certificates while developing.

v0.4.8

19 Apr 01:58
Compare
Choose a tag to compare

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

15 Jan 17:28
Compare
Choose a tag to compare

Fixed

  • Restore unintentional change to metadata merging.

v0.4.6

15 Jan 16:31
Compare
Choose a tag to compare

Fixed

  • Restore unintentional change to metadata merging.