All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
2.1.0 - 2019-05-30
createPage.fromTemplate
can now accept a function as its first parameter. This function gets allmetadata
and should return thesrc
.createPage.fromTemplate
will now also check for and load externalPAGENAME.metadata.json
orPAGENAME.metadata.yaml
as metadata. This metadata is treated as default metadata and inline metadata in the template file will override it.
2.0.8 - 2019-04-12
- Added a
--strict
flag for theacetate build
command. Builds with--strict
enabled will nowprocess.exit(1)
.
2.0.7 - 2019-02-24
acetate.symlink
now works properly against deeply nested directories.
2.0.6 - 2019-02-24
- Acetate now performs variable replacement in Markdown files with Nunjucks BEFORE rendering the markdown. This allows things like
[Link]({{relativePath}}/link/to/page/)
to be output properly.
2.0.5 - 2019-02-24
- Changes to
ignore
,dest
andurl
are now respected when set in transforms.
2.0.4 - 2019-02-23
- Check the resolved version of the pathname inside the
{% link %}
helper to determine if theis-active
class should be applied.
2.0.3 - 2019-02-23
- The
{$% link %}
helper no longer internal resolves pages. - When linking page like
{% link relativePath + '/nested/page/', 'Link With relativePath' %}
theactiveClass
is properly applied. - Links like
{% link '/nested/page#team', 'Team' %}
now have a trailing slash applied to the path - Add a new
startPath
option to the CLI.
2.0.2 - 2018-07-31
- Transforming
dest
andurl
properties are now respected by the dev server - Deeply nested initial values for queries are now handled properly
2.0.0 - 2018-02-1
- Custom
dest
andurl
properties are now respected by builds. - Headers on 404 page are now fixed
- Default highlight.js instance is now exposed and can now be overwritten at
acetate.highlight
.
2.0.0-rc.4 - 2017-08-11
- Templates for pages in
src
and dymanically created pages that were createdcreatePage.fromTemplate()
will now be reloaded from disk every time they are requested in from the dev server.
2.0.0-rc.3 - 2017-07-28
- Fix
ignore
option in loader
2.0.0-rc.2 - 2017-07-27
acetate.generate
has changed. Previouslyacetate.generate
accepted a function with the following signaturefunction (pages, createPage, callback) { }
. This signate is nowfunction (createPage, callback) { }
. You will no longer recive an array of pages in your generator function.
-
Options for
acetate.load
now accepts abasePath
option which will prepend a path to all pages loaded by that loader. For example:acetate.load("**/*.+(md|html)", { basePath: "doc" });
Will cause all pages to have
/doc/
prepended to their URLs and be output to the/doc
folder when building. -
A new config method
acetate.symlink(src, dest)
will create a symlink from asrc
directory, relative toacetate.root
(usuallyprocess.cwd()
) to a destination directory in your source folder. This should allow you to easily bring external directories into your acetate site, for example you couldacetate.symlink
a Git submodule.
2.0.0-rc.1 - 2017-07-22
- The development server now only transforms the requested pages rather then transforming the entire site. The leads to greatly improved rendering times.
- The
Renderer
,Transformer
, andLoader
classed used by theAcetate
class have all been refactored directly into the mainAcetate
class.
- Logging methods (
log
,info
,debug
, 'success',error
,time
, andtimeEnd
) are no longer on instances ofAcetate
. They are available on underacetate.log
object. You will need to make the following changes:acetate.log(/* ... */)
=>acetate.log.log(/* ... */)
acetate.info(/* ... */)
=>acetate.log.info(/* ... */)
acetate.debug(/* ... */)
=>acetate.log.debug(/* ... */)
acetate.success(/* ... */)
=>acetate.log.success(/* ... */)
acetate.error(/* ... */)
=>acetate.log.error(/* ... */)
acetate.time(/* ... */)
=>acetate.log.time(/* ... */)
acetate.timeEnd(/* ... */)
=>acetate.log.timeEnd(/* ... */)
acetate.transformAync
has been removed. You can now useacetate.transform
for the same purpose. You will need to make the following changes:acetate.transformAsync(/* ... */)
=>acetate.transform(/* ... */)
.
acetate.transformAll
andacetate.transformAllAsync
have been removed. Removal of these funcations allows for the performance improvments in the development server.- The MarkdownIt instance at
acetate.renderer.markdown
has been moved toacetate.markdown
. - The Nunjucks environment instance at
acetate.renderer.nunjucks
has been moved toacetate.nunjucks
. acetate.load
now accepts an options object with the following signateure{ignore: ['glob'], metadata: {}}
.ignore
will be an array of globs that this loader will ignore, andmetadata
will be the default metadata assigned to every page.- Use of
prettyURL
in page metadata has been removed. If you want to disable prettification of URLs you need to setprettyURL
in themetadata
option ofacetate.load
(see above).
1.3.5 - 2017-06-16
- Improved stability when building sites with large numbers of pages.
1.3.4 - 2017-01-31
- Live reloading of Markdown files on Windows now works.
1.3.3 - 2017-01-08
- Updated all underlying dependencies.
- Watcher now works when default metadata is present in the loader.
1.3.2 - 2016-12-19
- Fixed undesireable variables being merged into pages in some edgecases.
1.3.1 - 2016-12-19
- The
acetate.load
method now accepts a second parameter which is an object of default metadata to assign to the loaded pages.
- The
acetate.metadata
method now deep merges metadata with the page.
1.2.1 - 2016-12-19
acetate.metadata
now uses_.defaultsDeep
instead ofObject.assign
to allow for merging metadata recursivly.
relativePath
on root pages (index.html
) now properly equals.
to allow for things like{{relativePath}}/main.js
which wil properly render on all pages.- Several fixes for the CLI #64 (@paulcpederson)
1.1.1 - 2016-11-22
- Cached patterns for Minimatch in transformers. This should provide a large speed boost during the transform phase.
- Highlight JS tests
1.1.0 - 2016-10-24
- 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.
1.0.2 - 2016-8-18
- Switch back to a syncronous loader for Nunjucks that is more reliable.
1.0.1 - 2016-6-17
acetate.query
now works properly.
1.0.0 - 2016-6-17
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.
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.
acetate.use
. Replace withacetate.transformAllAsync
. You can no longer manipulate the state of theacetate
object, only the pages.acetate.output
. Replaced withacetate.generate
.
- Filters added with
acetate.filter
can now accept arguments. - Lots of strange behavior with the dev server, watcher and reloading configuration files.
- Tests have been rewritten with AVA
- Linting is now done by ESLint with the ESLint recommended rules and Semistandard
0.4.11 - 2016-05-21
- Queries are re-run whenever they are accessed to ensure the latest page data.
0.4.10 - 2016-04-28
- Proper MIME types for Markdown documents.
0.4.9 - 2016-04-22
- Added
https-cert
andhttps-key
as CLI options to allow for custom SSL certificates while developing.
0.4.8 - 2016-04-18
info
log level is now less verbose- Server now re-renders pages on every request, not just when the source file changes.
0.4.7 - 2016-01-14
- Restore unintentional change to metadata merging.
0.4.6 - 2016-01-14
- Restore unintentional change to metadata merging.
0.4.5 - 2016-01-014
- Pages created with
acetate.output
are no longer added multiple times.
0.4.4 - 2016-01-013
- Infinite loop where server rebuild files and then reloads.
0.4.3 - 2016-01-013
- Fixed memory leak when watching data files.
0.4.2 - 2016-01-07
- Pages are now always rebuilt every time they are requested when in server mode.
- Server startup is now much faster, as all pages are considered "clean" when the server starts and are rebuilt when requested.
- Small tweaks to logging and log output.
- Fixed memory leak when watching data files.
- Pages created with
acetate.output
are no longer added multiple times.
0.4.1 - 2016-01-05
- Extension names are now logged next to their run time.
- Extensions that are run inside extensions now run and execute after the extension that invoked them has finished.
0.4.0 - 2016-01-04
https
option that corresponds to the https option in BrowserSync.--https
flag for enabling https support in the CLI.acetate.output
helper for creating dynamically generated pages.- If
mode
isbuild
(the default) theacetate
method now accepts a callback that is passederrors
,warnings
andstatus
that will run after the site is built for better integration with Gulp #57. {% debug %}
helper that can print a specific variable like{% debug 'someVar' %}
or complete page metadata{% debug %}
- Console output from BrowserSync now has the
[Acetate]
prefix. - Tests now use node-tap
- Switch to Coveralls.io for code coverage reporting.
acetate.helper
can now create helpers without arguments.
- Travis CI and AppVeyor now both pass against Node 0.12, 4, and 5.
0.3.1 - 2015-06-30
- Built-in server now properly supports URLs without trailing slashes.
0.3.0 - 2015-06-21
- Built-in server is now based on BrowserSync and has built in live reload support.
- Built in server no longer needs to wait for the entire site to be built. It now builds and serves pages as requested.
server
andwatcher
options are deprecated. Now pass themode
option with a value of'server'
'watch'
or'build'
.findPort
option is deprecated. A port is always found by default now.
- Watching for changes to the configuration file should now work as expected.
- Tests now pass on Windows and are run with the AppVeyor CI.
- Support for 404 pages. This was a feature that was lost with the move to BrowserSync. It may be added back in the future.
0.2.2 - 2015-05-13
- Fixed a bug where
{{relativePath}}
would not produce the correct path in some cases.
0.2.1 - 2015-05-01
- Lots of new tests. Test coverage should now be fairly high with only a few remaining edge cases
- New
watcher:ready
event when the watcher starts watching files - New
watcher:start
event when the watcher starts - New
watcher:stop
event when the watcher stops - New
page:build
method for listening to when and individual page finished building - New
page:clean
method for when a pages built output is deleted
- Improvements to
travis.yml
, readme and contributing guide. - Updated dependencies
- Simplified framework for running tests and gathering coverage information
page.clean()
will no longer clear the directory if it is empty- Previously
acetate.query(name, glob, builder)
andacetate.transform(glob, transformer)
only accepted globs like'**/*'
to filter there input. They can now accept functions likefunction (page) { return page.transformMe; }
or simple objects{ transformMe: true }
to filter pages before running the query or transform
- It is not possible to run Acetate without a configuration file. Previously this worked but reported an error.
- Edge cases with building pretty URLs for non HTML files have been fixed
- Sever will now properly use a
404.html
page if it is present in yoursrc
folder. - The
url
property on the root page is now properly/
0.2.0 - 2015-04-25
- Large refactor to move to a factory based API and use composition to improve code clarity
acetate.args
will no longer include Acetate command line arguments- The
options
,args
src
,dest
,root
, andconfig
properties are now frozen and cannot be updated. - Update dependencies
- Additional CLI doc
- Pages now have more public properties including
metadata
which is a read only copy of the metadata found in the file anddirty
with will tell you if a page has changed since it was last built.
- Remove the
clean
option since it was buggy and did not operate how most people expect.
0.1.0 - 2015-04-17
- tests for error handling
- tests for edge cases in templates
- tests for data loading
- added release automation
- added changelog
- BREAKING
acetate.src
andacetate.dest
are removed. Pass them as options or with the-i
or-o
flags on the command line - refactored error handling and logging to be more compact
- refactored page loading to be simpler
- move runner and CLI to event based system
- Unit testing
- Continuous integration