title | description |
---|---|
getPageSnapshot |
An instance method that fetches a snapshot of a Makeswift page at a given path. This snapshot is only intended to be rendered by the `<Page>` component. |
import PagesCatchAllExample from "/snippets/pages-router/catch-all.mdx" import PagesCatchAllLocalizedExample from "/snippets/pages-router/catch-all-localized.mdx"
- The path of the page.
- Options for site version and locale. The return value from [`getSiteVersion`](/developer/reference/client/get-site-version). A valid locale string.
The following example sets up a catch all route where page snapshots are fetched from Makeswift and rendered using the <Page>
component.
The following example uses the locale
param in getStaticProps
to fetch a localized snapshot of a page.