Arguments
-
stringrequiredThe path of the page.
-
objectrequiredOptions for site version and locale.
Return type
Promise<MakeswiftPageSnapshot | null>
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 thelocale param in getStaticProps to fetch a localized snapshot of a page.
src/pages/[[...path]].tsx