Owen Conti

Using GitHub's Gists for embedded code blocks on your Statamic v3 site

Posted on under Statamic by Owen Conti.

Check how easy it is to have proper syntax highlighting added to your code blocks:

Turns into this when you save:

1const foo = {'bar': 123};

How easy was that?!?

Couldn't be any easier to get awesome syntax highlighting directly into your website!

How does it work?

It works via the Oh See Gists Statamic v3 add-on: https://statamic.com/marketplace/addons/oh-see-gists

The add-on uses your GitHub account to sync your entry's content to Gists whenever you save data.

Find it on the Statamic marketplace

If you have a site running Statamic v3 and you're looking to embed code blocks with proper syntax highlighting, look no further!

Another awesome benefit is you don't have to worry about installing CSS/JS for syntax highlighting into your site. GitHub's Gist iframe will include all of that for you.

https://statamic.com/marketplace/addons/oh-see-gists


Thanks for reading this article!

Hopefully you found this article useful! If you did, share it on Twitter!

Found an issue with the article? Submit your edits against the repository.