Skip to content

ContentChef/nuxtjs-starter

Repository files navigation

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!

Requirements

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

nuxtjs-starter

Clone & Installation

Clone the starter repo and install all the deps

    git https://github.com/ContentChef/nuxtjs-starter.git
    cd nuxtjs-starter
    npm install

Get your SpaceID, Online API Key from your dashboard home page.

ContentChef Dashboard - Home

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!

To Learns More

About

ContentChef + NuxtJs Starter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors