- Added Support scheduled posts.
- Now depending on Express 4.0.0+, issue #102, no longer supports Express v3.
- Fixed some issues with allow Express 4.0.0+ in tests and examples 2816f43a68e04714bf28a838cb618e7cf5517a68, 57eba690d1a4e1b07a1d1c2b6fbb82e7c062cdca
- Render helpful errors in posts that have template errors, and hide posts with template errors in production, issue #82
- Expose additional properties to template functions, issue #81
- Add method
unwatchto remove all current watchers, issue #68
routesconfiguration option during instantiation will no longer create routes that are not explicitly defined, unless using defaults, issue #71
routesas empty will continue to use the default routing.
nullwill not set any routes.
routesto an object will only define routes specified in that object. Therefore, using an empty object will not set any routes.
⚠️Post slugs are now created from the
titleattribute instead of the file name. Slugs can also be customized by adding a
slugattribute in a post, issue #64, issue #69
- Bake version of
json-front-matterto be consistent with previous versions -- can include newer versions with custom templating.
- Handles errors more gracefully when posts cannot compile with their template, issue #61
- Added async templating processing, issue #50
- Fixed hiding drafts in helper functions, issue #54, issue #48
showFutureto hide posts scheduled for the future, issue #47
- Added a 'next()' fallback for the auto page route, issue #45
- Allow users to specify their own options to be included in
poet.options, issue #37,
- Fixed an issue where calling
addRoutewith an invalid route misbehaves, issue #38
Check out the examples directory for updated uses of the changes.
require('poet')now returns a constructor (
newis not needed). The constructor takes an Express app argument and an options argument. All methods are now performed on the resulting instance, rather than the global Poet object.
- Auto updating now possible! The
watchmethod has been added to auto update poet on any post change.
initmethod now returns a promise for the completion of the reinitialization. It also still accepts a callback.
sethas been removed -- options are passed in during instantiation.
- All route creation methods (
createCategoryRoute) have been removed and created on instantiation. The
routesoption in configuration may be used instead.
addRoutemethod has been added to define a custom route.
middlewarehas been removed. This can be achieved by using the instance's
helperproperties which contain all the previous helpers/locals.
- Several locals/helpers have been renamed:
- Several helpers have been removed and turned into functions
postListcan now be retrieved via
tagListcan now be retrieved via
categoryListcan now be retrieved via