Client
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.
Arguments
-
pathnamestringrequired
The path of the page.
-
optionsobjectrequired
Options for site version and locale.
Return type
snapshot
Snapshot
An opaque Snapshot
object that is only intended to be rendered by the
<Page>
component.
Examples
Basic usage
The following example sets up a catch all route where page snapshots are fetched from Makeswift and rendered using the <Page>
component.
Localization
The following example uses the locale
param in getStaticProps
to fetch a localized snapshot of a page.
pages/[[...path]].tsx
Was this page helpful?