Releases: ReeceM/prismic-sitemap
Releases · ReeceM/prismic-sitemap
v0.5.3 - release fix
v0.5.2
v0.5.1
Full Changelog: v0.5.0...v0.5.1
v0.5.0
v0.4.3
v0.4.2
v0.4.1 - Pagination Fix
v0.4.0 (Pagination Automation)
0.4.0 - 2021-07-24
Feature
- Added automatic pagination for all document types defined, or all that are returned.
- this can also be configured with a pageSize per query if you wish to control that.
Thanks:
Thank you @amala-james-cko for making an initial PR and also noticing as well as @erikdroh
Using the feature
The feature is enabled by default, so when requesting a document type set it will automatically page through each set of results for the doc and the move onto the next
The option to set the pageSize per each request is available if there are issues with requesting only 20 pages at a time.
{
sitemap: {
linkResolver = Function,
apiEndpoint = String,
accessToken = String|null,
hostname = String,
fileName = String,
optionsMapPerDocumentType = Object|Object<Function>,
defaultEntryOption = Object,
staticPaths = Array<Object>,
+ pagination = {
+ pageSize: Number,
+ },
documentTypes = Array,
sitemapConfig = Object
}
}
Caveats
The feature may cause an issue I suspect if there are lots of pages, as it currently places it first into an in memory object then into the sitemap stream. So a future release will likely change that flow. But it won't be breaking. :)
v0.3.1
v0.3.0 - lastmod suppport
Release of version 0.3.0
Added
- Option to make use of callback in
optionsMapPerDocumentType
see Discussion Lastmod support #8, thank you @mkbctrl for highlighting this missing bit. - Added option to have a static path list of urls for normal routes that aren't dynamic
- Static paths can also have functions that allow it to perform some other logic on the user level
- static paths will use the latest date for
lastmod
if not defined
Changed
- Made the URL result from the linkResolver take priority on results that go into the sitemap
- The
sitemapConfig
option is using thelastmodDateOnly = true
setting to ensure all lastmod dates areYYYY-MM-DD
only. But can be disabled to keep UTC time.