Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/im-perativa/gatsby-starter-ghost
https://github.com/im-perativa/gatsby-starter-ghost
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/im-perativa/gatsby-starter-ghost
- Owner: im-perativa
- License: mit
- Created: 2019-09-09T04:12:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T09:29:21.000Z (almost 2 years ago)
- Last Synced: 2023-05-05T02:30:20.651Z (over 1 year ago)
- Language: JavaScript
- Size: 4.47 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gatsby Starter Ghost
A starter template to build lightning fast websites with [Ghost](https://ghost.org) & [Gatsby](https://gatsbyjs.org)
**Demo:** https://gatsby.ghost.org
![gatsby-starter-ghost](https://user-images.githubusercontent.com/120485/50913567-8ab8e380-142c-11e9-9e78-de02ded12fc6.jpg)
# Installing
```bash
# With Gatsby CLI
gatsby new gatsby-starter-ghost https://github.com/TryGhost/gatsby-starter-ghost.git
``````bash
# From Source
git clone https://github.com/TryGhost/gatsby-starter-ghost.git
cd gatsby-starter-ghost
```Then install dependencies
```bash
yarn
```
# Running
Start the development server. You now have a Gatsby site pulling content from headless Ghost.
```bash
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 your `contentApiKey` in the "Integrations" screen in Ghost Admin. The minimum required version for Ghost is `2.10.0` in order to use this starter without issues.
# Deploying with Netlify
The starter contains three config files specifically for deploying with Netlify. A `netlify.toml` file for build settings, a `/static/_headers` file with default security headers set for all routes, and `/static/_redirects` to set Netlify custom domain redirects.
To deploy to your Netlify account, hit the button below.
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/TryGhost/gatsby-starter-ghost)
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](https://www.netlify.com/docs/continuous-deployment/#build-environment-variables) for production builds instead.
Once deployed, you can set up a [Ghost + Netlify Integration](https://docs.ghost.org/integrations/netlify/) to use deploy hooks from Ghost to trigger Netlify rebuilds. That way, any time data changes in Ghost, your site will rebuild on Netlify.
# 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 `` so your Gatsby front-end becomes the source of truth for SEO.
# Extra options
```bash
# Run a production build, locally
gatsby build# Serve a production build, locally
gatsby serve
```Gatsby `develop` uses the `development` config in `.ghost.json` - while Gatsby `build` uses the `production` config.
# Copyright & License
Copyright (c) 2013-2019 Ghost Foundation - Released under the [MIT license](LICENSE).