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!
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.
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.
Hopefully you found this article useful! If you did, share it on X!
Found an issue with the article? Submit your edits against the repository.