mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## 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
A statically generated blog example using Next.js and dotCMS
This example showcases Next.js's Static Generation feature using dotCMS as the data source.
Demo
https://nextjs-dotcms-blog.vercel.app/
Deploy your own
Using the Deploy Button below, you'll deploy the Next.js project.
Related examples
- AgilityCMS
- Builder.io
- ButterCMS
- Contentful
- Cosmic
- DatoCMS
- DotCMS
- Drupal
- Enterspeed
- Ghost
- GraphCMS
- Kontent
- Prepr
- Prismic
- Sanity
- Sitefinity
- Storyblok
- TakeShape
- Umbraco heartcore
- Webiny
- Blog Starter
- WordPress
How to use
Rename .env.local.example to .env.local and complete the variables:
NEXT_PUBLIC_DOTCMS_HOST is the dotCMS host, you can use https://demo.dotcms.com
DOTCMS_TOKEN for the demo site, you can generate the token using:
curl -H "Content-Type:application/json" --insecure -X POST -d '
{ "user":"[email protected]", "password":"admin", "expirationDays": 10 }
' http://demo.dotcms.com:8080/api/v1/authentication/api-token
Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example cms-dotcms cms-dotcms-app
# or
yarn create next-app --example cms-dotcms cms-dotcms-app
# or
pnpm create next-app --example cms-dotcms cms-dotcms-app