Releases: jsantell/poet
Releases · jsantell/poet
v1.0.0
v1.0.0
- Fixed some issues with allow Express 4.0.0+ in tests and examples 2816f43, 57eba69
- 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
unwatch
to remove all current watchers, issue #68
v1.0.0-rc4
v1.0.0-rc4
⚠️ Theroutes
configuration option during instantiation will no longer create routes that are not explicitly defined, unless using defaults, issue #71- Leaving
routes
as empty will continue to use the default routing. - Setting
routes
tonull
will not set any routes. - Setting
routes
to an object will only define routes specified in that object. Therefore, using an empty object will not set any routes.
- Leaving
⚠️ Post slugs are now created from thetitle
attribute instead of the file name. Slugs can also be customized by adding aslug
attribute in a post, issue #64, issue #69- Bake version of
marked
andjson-front-matter
to 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
v1.0.0-rc3
v1.0.0-rc2
v1.0.0-rc2
Some small, but useful changes -- after the next round of issues are cleared, this will probably be good to go to v1.0.0 proper. Just wanted to publish for users to get the latest via npm!
1.0.0rc1
v1.0.0rc1
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()