This example showcases how you can use Makeswift to visually build statically generated pages in Next.js.
Deploy the example using Vercel:
-
Download the example:
Execute
create-next-app
with npm, Yarn, or pnpm to bootstrap the example:npx create-next-app --example cms-makeswift cms-makeswift-app # or yarn create next-app --example cms-makeswift cms-makeswift-app # or pnpm create next-app --example cms-makeswift cms-makeswift-app
-
Install dependencies:
yarn install # or npm install # or pnpm install
-
Rename the
.env.local.example
file to.env.local
and include your Makeswift site's API key:-- MAKESWIFT_API_HOST= -- MAKESWIFT_SITE_API_KEY= ++ MAKESWIFT_API_HOST=https://api.makeswift.com ++ MAKESWIFT_SITE_API_KEY=<YOUR_MAKESWIFT_SITE_API_KEY>
-
Run the local dev script:
yarn dev # or npm run dev
Your host should be up and running on http://localhost:3000.
-
Finally, go to your Makeswift site settings and add http://localhost:3000/makeswift as the host URL and you're all set!
When you're ready to go live, deploy it to the cloud with Vercel (Documentation). All you'll need to do is update your host inside of Makeswift to your Vercel deployment.
With Makeswift, you can give your marketing team custom building blocks to create high quality Next.js pages.
To learn more about Makeswift, take a look at the following resources:
You can check out the Makeswift GitHub repository - your feedback and contributions are welcome!