Upgrading to 0.19.0
If you haven’t upgraded to 0.18.0
please read the upgrading guide.
This upgrade guide is only necessary if you’re using the getPages
Makeswift
client method. If you’re not using this method, you can safely skip this upgrade
guide.
We also recommend following this guide if you’re using the getSitemap
client
method, which has been deprecated in this release.
Updating usage of getPages
In previous versions of the runtime, the Makeswift client provided a getPages
method to retrieve a list of all Makeswift page paths and their id
s in the site.
In v0.19.0
, the getPages
method now has sorting, path filtering, and
pagination. This method was not previously paginated - in order to get all your
pages, you may now use our .toArray
pagination helper method, which will
automatically paginate through all results and aggregate them into an array:
getPages
now returns an instance of IterablePaginationResult
, a decorated
async iterable which includes methods .map
and .filter
, in addition to
.toArray
, mentioned above. The MakeswiftPage
type has also been updated to
include several more data fields from the Makeswift page.
For more information about the usage of the getPages
client method, please
refer to the getPages
documentation.
Deprecation of getSitemap
v0.19.0
of the runtime also deprecates the getSitemap
client method. While
getSitemap
is still available in this version, it will be removed in a
future release. We recommend using the getPages
method to construct your
sitemap instead.
Note that the deprecation of getSitemap
now involves the host
being responsible for the construction of page URLs in the sitemap (either with
domain or path based localization).
Below is an example for pages router that uses path-based localization with the
next-sitemap
library:
Here’s another example for Next.js’s App Router built-in support for sitemaps:
Here is the link to the official release notes.
Was this page helpful?