1.0.0rc1
Pre-release
Pre-release
v1.0.0rc1
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 (
createPostRoute,createPageRoute,createTagRoute,createCategoryRoute) have been removed and created on instantiation. Theroutesoption 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'shelperproperties which contain all the previous helpers/locals.- Several locals/helpers have been renamed:
pageUrlis nowpageURLtagUrlis nowtagURLcategoryUrlis nowcategoryURLsortedPostsWithCategoryis nowpostsWithCategorysortedPostsWithTagis nowpostsWithTag
- Several helpers have been removed and turned into functions
postListcan now be retrieved viagetPosts()tagListcan now be retrieved viagetTags()categoryListcan now be retrieved viagetCategories()