This repo contains an example blog website that is built with Gridsome, and Cosmic JS.
Uses the Cosmic JS Gridsome Source Plugin
- Node (I recommend using v8.2.0 or higher)
- Gridsome CLI
# 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