- Added async templating processing, issue #50
- Fixed hiding drafts in helper functions, issue #54, issue #48
- Option
showFuture
to 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
addRoute
with an invalid route misbehaves, issue #38
Check out the examples directory for updated uses of the changes.
require('poet')
now returns a constructor (new
is 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
watch
method has been added to auto update poet on any post change. init
method now returns a promise for the completion of the reinitialization. It also still accepts a callback.set
has been removed -- options are passed in during instantiation.- All route creation methods (
createPostRoute
,createPageRoute
,createTagRoute
,createCategoryRoute
) have been removed and created on instantiation. Theroutes
option in configuration may be used instead. addRoute
method has been added to define a custom route.middleware
has been removed. This can be achieved by using the instance'shelper
properties which contain all the previous helpers/locals.- Several locals/helpers have been renamed:
pageUrl
is nowpageURL
tagUrl
is nowtagURL
categoryUrl
is nowcategoryURL
sortedPostsWithCategory
is nowpostsWithCategory
sortedPostsWithTag
is nowpostsWithTag
- Several helpers have been removed and turned into functions
postList
can now be retrieved viagetPosts()
tagList
can now be retrieved viagetTags()
categoryList
can now be retrieved viagetCategories()