Files
vercel__next.js/examples/cms-dotcms/README.md
Jam Balaya 6aafef389b examples: improve DX while copying command to create new project (#73463)
## Description

Follow up #38410.
Some examples remain the multiple commands in a single block, and we
couldn't use copy button to select one line.
With this change users would be able to copy the command (using their
choice package manager) with a single click using the github copy
feature.

CC: @samcx 

### Adding or Updating Examples

- [x] The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`.
See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md
2025-01-14 05:38:46 +00:00

3.1 KiB

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.

Deploy with Vercel

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":"admin@dotcms.com", "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
yarn create next-app --example cms-dotcms cms-dotcms-app
pnpm create next-app --example cms-dotcms cms-dotcms-app

Deploy with Vercel