Skip to content
A mini version of the gatsby-starter-ghost starter
JavaScript
Branch: master
Clone or download
nishantdania Merge pull request #1 from milarze/bugfix/build-failure-when-ghost-ha…
…s-no-posts

[BUGFIX] Build failure when Ghost blog has no posts
Latest commit 7714c5d Mar 5, 2019

README.md

Ghost Gastby Starter Mini

A mini version of the original starter template to build lightning fast websites with Ghost & Gatsby.

I stripped out the CSS, custom components and any Netlify related files from gatsby-starter-ghost. You only get a very basic index page and a basic posts page. The other pages can still be enabled as described in this documentation below.

Demo

ghost-gatsby-starter-mini

Installing

# With Gatsby CLI
gatsby new personal-blog https://github.com/nishantdania/ghost-gatsby-starter-mini

Then install dependencies

yarn

Running

Start the development server. You now have a Gatsby site pulling content from headless Ghost.

gatsby develop

By default, the starter will populate content from a default Ghost install located at https://gatsby.ghost.io.

To use your own install, edit the .ghost.json config file with your credentials. You can find or your contentApiKey in the "Integrations" screen in Ghost Admin.

Content API Keys are generally not considered to be sensitive information, they exist so that they can be changed in the event of abuse so most people commit it directly to their ghost.json config file. If you prefer to keep this information out of your repository you can remove this config and set Netlify ENV variables for production builds instead.

Open community page

You can join the spectrum chat group for any questions around implementation to or maybe just for the sake of show and tell >> Ghost Gatsby Spectrum

Optimising

You can disable the default Ghost Handlebars Theme front-end by enabling the Make this site private flag within your Ghost settings. This enables password protection in front of the Ghost install and sets <meta name="robots" content="noindex" /> so your Gatsby front-end becomes the source of truth for SEO.

Extra options

# Run a production build, locally
gatsby build

# Serve a production build, locally
gatsby serve

Gatsby develop uses the dev config in ghost.json - while Gatsby serve uses the production config.

Site config

Some config variables used for adding meta data can be defined in the src/utils/siteConfig.js file.

Enabling the author, tags and page templates

Please use this file from the gatsby-source-ghost project as a reference >> gatsby-node.js

Shoutout

A huge shoutout to the Ghost team for getting the original version out.

Copyright & License

Copyright (c) 2019 Nishant Dania Released under the MIT license.

You can’t perform that action at this time.