NuxtJs Starter for ContentChef - Headless CMS
ContentChef is an Headless CMS designed to accelarete the development of modern,cross channel digital products.
This starter is a simple NuxtJs integrated with our Delivery API using the ContentChef JS/Typescript SDK
In this example plain JS is used, but our SDK is primarly written for Typescript applications!
In order to use make this starter work, you will need
- An active ContentChef account (sign up for a 30-day free trial here)
- Node JS >= 10.13
Clone the starter repo and install all the deps
git https://github.com/ContentChef/nuxtjs-starter.git
cd nuxtjs-starter
npm installGet your SpaceID, Online API Key from your dashboard home page.
Open ./plugins/ctx-contentchef-client.js and copy your data in the client configuration and use "example-ch" for your channel now.
import ContentChefClient, { createUrl } from '@contentchef/contentchef-node';
class ContentChef {
targetDate;
onlineChannel;
defaultChannel = 'example-ch';
constructor() {
this.onlineChannel = ContentChefClient({
spaceId: 'your-space-id',
}, this.targetDate).onlineChannel('your-online-api-key', this.defaultChannel);
}
}You are now ready to start the nuxtjs server
npm run dev
Enjoy!
You can now visit https://localhost:3000/ and see the list of content fetched from Content Chef!
- ContentChef Website
- ContentChef Docs
- ContentChef Blog
- Nuxt.js Documentation - learn about Nuxt.js features and API.