Arguments
-
The path of the page.
-
Options for site version and locale.
Return type
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
Changelog
| Version | Changes |
|---|---|
v0.24.0 | Adds allowLocaleFallback option |
v0.11.0 | Adds locale option |
v0.2.0 | getPageSnapshot method introduced |