rsnext/examples/cms-dotcms
JJ Kasper 07b471e318
Lock experimental react version in tests (#41100)
x-ref: [slack
thread](https://vercel.slack.com/archives/CGU8HUTUH/p1664579732577999)
x-ref:
https://github.com/vercel/next.js/actions/runs/3162459138/jobs/5149086901
x-ref:
https://github.com/vercel/next.js/actions/runs/3162459138/jobs/5149086956

Also fixes invalid example env file name breaking checkout on Windows

x-ref:
https://dev.azure.com/nextjs/next.js/_build/results?buildId=41449&view=logs&jobId=59111904-15f9-56fe-00af-da61f595b979

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`
2022-10-01 23:06:45 -07:00
..
components chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
lib chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
pages chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
public/favicon chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
styles chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
.env.local.example Lock experimental react version in tests (#41100) 2022-10-01 23:06:45 -07:00
.gitignore chore(examples): fix example checks 2022-10-01 22:48:51 +02:00
next.config.js chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
package.json chore(examples): address remaining review in dotCMS example (#41091) 2022-10-01 22:46:41 +02:00
postcss.config.js chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
README.md chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
tailwind.config.js chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00
tsconfig.json chore(examples): Add dotCMS example (#38214) 2022-10-01 15:26:13 +02:00

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
# or
yarn create next-app --example cms-dotcms cms-dotcms-app
# or
pnpm create next-app --example cms-dotcms cms-dotcms-app

Deploy with Vercel