Skip to main content

Arguments

  1. string
    required
    The path of the page.
  2. object
    required
    Options 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 the locale param in getStaticProps to fetch a localized snapshot of a page.
src/pages/[[...path]].tsx

Changelog