/gridsome-blog

Blazing fast blog built using Gridsome that utilizes the power of Cosmic JS.

Primary LanguageVue

Gridsome + Cosmic JS

This repo contains an example blog website that is built with Gridsome, and Cosmic JS.

See live demo hosted on Netlify

Uses the Cosmic JS Gridsome Source Plugin

Prerequisites

Install

# Make sure that you have the Gatsby CLI program installed
npm install --global @gridsome/cli

# run from your CLI
gridsome new gridsome-blog https://github.com/cosmicjs/gridsome-blog

In gridsome.config.js you need to add configuration for your Cosmic JS Bucket

plugins: [
  {
    resolve: 'gridsome-source-cosmicjs',
    options: {
      bucketSlug: '', /* bucket slug */
      objectTypes: ['posts', 'settings'], /* object slugs you want to populate */
      apiAccess: {
        read_key: '', /* optional but recommended */
      }
    }
  }
],

Then

# Then you can run it by
cd gridsome-blog
npm run develop