How to use Ghost as a headless CMS with popular static site generators
Settings > General
- which will put a password on your Ghost install’s front-end, disable all SEO features, and serve a noindex
meta tag.
You can also use dynamic redirects, locally or at a DNS level, to forward traffic automatically from the Ghost front-end to your new headless front-end - but this is a more fragile setup. If you use Ghost’s built-in newsletter functionality, unsubscribe links in emails will point to the Ghost origin - and these URLs will break if redirected. Preview URLs and other dynamically generated paths may also behave unexpectedly when blanket redirects are used.
Usually ‘Private Site Mode’ is the better option.
?limit=all
when fetching data was removed in Ghost 6.0, and all endpoints now have a max page size of 100.
This means any front-end frameworks that relied on ?limit=all
for building static pages, such as with getStaticPaths()
in Next.js, should instead use pagination to fetch all of the needed data.
For example: