Reference
MakeswiftApiHandler
An API route for Makeswift that adds support for preview mode, on-demand revalidation, and other features that make Makeswift work seamlessly with your Next.js app.
Arguments
-
apiKeystringrequired
The API key for the Makeswift site.
-
optionsobject
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.
Was this page helpful?