The fastest React frontend for headless Ghost CMS.
Create and publish flaring fast blogs with next-cms-ghost. Powered by the React framework Next.js and content fed by headless Ghost, you'll get a production ready hybrid frontend that combines the best of static and server-rendered sites. Most importantly, your website can be easily distributed globally to be served from the edge. At the same time your content creators can continue to work with the Ghost authoring system they are used to.
Check out Blogody for an integrated solution with all the benefits of this repository included!
Ghost CMS integration
- Supports Ghost `v3` and `v4`
Ghost Casper look & feel
- Infinite scroll
- Fully responsive
- Sticky navigation headers
- Hover on author avatar
- Styled 404 page
- Preview Section in posts
- RSS feed
- SEO optimized
Extened Casper Styles
- Dark Mode
- Featured posts pinned on top
- Customizable navigation headers
- Zoom images on click to full-screen
- Render GitHub Gists
Images with Next/Images
- Feature and inline images
- Auto-optimized images
- No content shifts due to consistent placeholders
- Auto-detects custom paths
- Configurable collections
- MIT licenced
- Truly open-source
- Easy to contribute
- Made typesafe with TypeScript
- Member Subscriptions
- Commenting with Commento or Disqus
- Syntax highlighting with PrismJS
- Table Of Contents
- Contact Page with built-in notification service
- Google Analytics
- Incremental Regeneration
- Support for Preview
Scores calculated with Lighthouse 6.4.0.
🏁 Getting Started
git clone https://github.com/styxlab/next-cms-ghost.git cd next-cms-ghost yarn # Development yarn dev # Production yarn build
🌀 NextJS image optimizations
IMAGE_DOMAINS environment variable must contain a comma separated list of all domains that you use for in-sourcing images. For example:
Image optimization is automatically turned off when deploying to Netlify, because it is currently on supported on Netlify.
🌎 Domain Settings
SITE_URL environment variable should be set to the public facing URL of your site, in most cases to your custom domain.
If you don't specify
SITE_URL, it will get populated according to the following defaults:
|Vercel||VERCEL_URL||Automatically expose System Environment Variables must be checked|
In all other cases
SITE_URL is set to
🔑 Ghost Content API keys
All content is sourced from a Ghost CMS. Choose the method according to your build scenario.
Create a new text file
.env.local in the project root folder with the following content:
CMS_GHOST_API_KEY with the values that you can generate in your Ghost Admin under
Building with cloud providers
If you build your project with a cloud provider, the best option is to provide the keys with environment variables:
For best results, deploying to Vercel is recommended. As an alternative, you can also deploy to Netlify.
🤯 Ensure headless mode of Ghost CMS
For best SEO results it is strongly recommended to disable the default Ghost Handlebars theme front-end by selecting the Make this site private flag within your Ghost admin settings.
💣 Reporting issues
Please report all bugs and issues at next-cms-ghost/issues.
PRs are welcome! Consider contributing to this project if you want to make a better web.
Special thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
This project is not affiliated with NextJS or Ghost.
Copyright & License
Copyright (c) 2020 - 2021 styxlab - Released under the MIT license.