Skip to main content

Arguments

  1. string
    required
    The API key for the Makeswift site.
  2. object
    required
    Options for site version and locale.

Examples

App Router

src/app/api/makeswift/[...makeswift]/route.ts

Pages router

src/pages/api/makeswift/[...makeswift].ts

Adding fonts

The following example adds Spline Sans and Spline Sans Mono fonts to the site using next/font and adds them to the MakeswiftApiHandler. Using a variable font reduces the number of font files requested.

Using onPublish event