rsnext/examples/cms-makeswift
Steven 4466ba436b
chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
..
lib/makeswift chore(examples): use default prettier for examples/templates (#60530) 2024-01-11 16:01:44 -07:00
pages chore(examples): use default prettier for examples/templates (#60530) 2024-01-11 16:01:44 -07:00
.env.local.example Update cms-makeswift example (#39834) 2022-08-22 16:02:19 -05:00
.gitignore Add .yarn/install-state.gz to .gitignore (#56637) 2023-10-18 16:34:48 +00:00
next-env.d.ts Remove incorrect entries for pnpm debug log (#47241) 2023-03-26 22:26:05 -07:00
next.config.js chore(examples): use default prettier for examples/templates (#60530) 2024-01-11 16:01:44 -07:00
package.json update @types/react version in examples (#57259) 2023-10-26 19:52:08 -05:00
README.md update example Deploy button URLs (#48842) 2023-04-26 13:31:44 -04:00
tsconfig.json Add a Makeswift example (#38018) 2022-06-29 13:25:51 -05:00

A statically generated landing page with Next.js and Makeswift

This example showcases how you can use Makeswift to visually build statically generated pages in Next.js.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

Demo

https://nextjs-makeswift-example.vercel.app/

How to use

  1. 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
    
  2. Install dependencies:

    yarn install
    # or
    npm install
    # or
    pnpm install
    
  3. 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>
    
  4. Run the local dev script:

    yarn dev
    # or
    npm run dev
    

    Your host should be up and running on http://localhost:3000.

  5. Finally, go to your Makeswift site settings and add http://localhost:3000/makeswift as the host URL and you're all set!

Deploy it

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.

Next steps

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!