Showcase code snippets directly from a GitHubGist inside the Ghost editor using sensible embeds

If you want to share code examples that have been published on GitHubGist then you can do so by copying the embed code and pasting it into a card in the Ghost editor.

GitHub is a reliable environment to host your code snippets, share your work or find inspiration and every single Gist entry can be embedded directly into Ghost.

Create a new Gist

GitHubGist is a free community tool - once you're signed up you can create a new Gist and start building your code snippet:

Grab the embed code

Once your code snippet is good to go, locate the embed option from the dropdown in the top navigation and copy the HTML code:

Paste it into a HTML card in the editor

Create a new HTML block in the Ghost editor on the post you would like to embed your code snippet and paste in the embed code.

Publish your post

That's all there is to it! Ghost allows you to paste embed code directly into the HTML block to share a Gist code snippet with your readers.

This is the quickest way to embed a Gist in Ghost. If you're using the default theme, Casper, then this will look great without further styling. For other themes, you may want to make some styling changes in your theme.

Here's an example of the end result:

Do more with Zapier

Power up your site even further using Zapier. If you're already using GitHub, then you might also like some of these complimentary automations: