contentful + Nuxt
- Copy
.env.sample
to.env
- Fill out tokens
CTF_BLOG_POST_TYPE_ID
fromContentful > Content model
CTF_SPACE_ID
,CTF_CDA_ACCESS_TOKEN
,CTF_CPA_ACCESS_TOKEN
fromContentful > Space settings > API Keys > Content delivery / preview tokens
CTF_MANAGEMENT_TOKEN
fromContentful > Space settings > API Keys > Content management tokens > Personal Access Tokens
- Open
Contentful > Space settings > Content preview
- Set value
http://localhost:3000/posts/{entry_id}
intoContentful preview URLs
- In editting your content. Click
Open preview
will open your local server preview.
# install dependencies
$ npm install # Or yarn install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm start
# generate static project
$ npm run generate
For detailed explanation on how things work, checkout the Nuxt.js docs.