Simple Ghost default theme for next.js
By default, the starter will populate content from a default Ghost install located at https://next-ghost-blog.herokuapp.com/ .
To use your own install, you will need to edit the site-config
config file with your credentials. Change the apiUrl
value to the URL of your Ghost site. For Ghost(Pro) customers, this is the Ghost URL ending in .ghost.io
, and for people using the self-hosted version of Ghost, it's the same URL used to access your site.
Next, update the contentkey
value to a key associated with the Ghost site. A key can be provided by creating an integration within Ghost Admin. Navigate to Integrations and click "Add new integration". Name the integration appropriately and click create.
Finally, configure your desired URL in site-config.js
, so links (e. g. canonical links) are generated correctly. Y
The default Ghost version that is used for this starter is 3.x
.
Ghost <=3.0.0
const appUrl = "https://next-ghost-blog.herokuapp.com/";
const contentKey = "382362c8a9a611d23db0adefc1";
To deploy to your Netlify account, hit the button below.
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 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.
Once deployed, you can set up a Ghost + Netlify Integration to use deploy hooks from Ghost to trigger Netlify rebuilds. That way, any time data changes in Ghost, your site will rebuild on Netlify.