Push Markdown to Github, then have Ghost update post automatically?

#1

Is there a way I can host Markdown in Github, and every time I commit, Ghost picks this up and then updates the relevant blog post? I don’t necessarily want to use Gatsby or some other JAMStack tool, I want to stick to the same Casper theme and workflow. As well, I like the ability of Ghost to schedule posts for the future, which Gatsby and others don’t necessarily have, being pure HTML with no backend.

#2

There’s nothing built in to Ghost to do this specific thing but you could make use of the tools that Ghost and Github/other services give you.

For example, you could use Github Actions to write a workflow that uses the Ghost Admin API to create or update a post when you push a commit.

#3

Oh that’s interesting, I didn’t know about that. I’ll check out Github
Actions and the Ghost API.

#4

Gatsby sites using Ghost don’t lose this functionality. The idea with using a static site builder like Gatsby is that it’s hooked up in a way that the site is re-built any time your Ghost content changes using Ghost’s “Site updated (rebuild)” webhook, which works for scheduled posts too.

A typical setup is use Netlify to host your static site, they have a webhooks implementation that can be use to trigger a rebuild and automatically update your static site.

closed #5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.