A Next.js app for creating blogs from headless content managment systems (CMS).
- Ghost CMS integration
- Ghost Casper look & feel
- SEO optimized
- Andvanced Routing
- Featured posts pinned on top
- Sticky navigation headers
- Hover on author avatar
- Fully responsive
- Made type safe with TypeScript
- Next.js feature images
- Sitemap
- Styled 404 page
- Dark Mode
- RSS feed
- Member Subscriptions
- Commento
- PrismJS
- Next.js inline images
- Table Of Contents
- Contact Page
- Pagination
- Preview Section in Posts
- Infinite Scroll
- Preview
- Incremental Regeneration
Scores calculated with Lighthouse 6.4.0.
git clone https://github.com/styxlab/next-cms-ghost.git
cd next-cms-ghost
yarn
# Development
yarn dev
# Production
yarn build
Please change the siteUrl
to your build system in siteConfig.ts
:
export const siteUrl = `http://localhost:3000`
//export const siteUrl = `https://your.blog.org
You must add all domains that you use for insourcing images in the next.config.js
file, for example:
module.exports = {
images: {
domains: ['images.unsplash.com', 'static.gotsby.org'],
},
}
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:
CMS_GHOST_API_URL=http://localhost:2368
CMS_GHOST_API_KEY=9fccdb0e4ea5b572e2e5b92942
If you build your project with a cloud provider, the best option is to provide the keys with environment variables:
Key | Value (example) |
---|---|
CMS_GHOST_API_URL | http://localhost:2368 |
CMS_GHOST_API_KEY | 9fccdb0e4ea5b572e2e5b92942 |
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.
PRs are welcome! Consider contributing to this project if you want to make a better web.
Please report all bugs and issues at next-cms-ghost/issues.
This project is not affiliated with NextJS or Ghost.
Copyright (c) 2020 styxlab - Released under the MIT license.