Code Snippets

Small pieces of code for things a Ghost theme may not do on its own: a reading progress bar, a table of contents, custom fonts, a dark mode toggle. Each one is written to work with any theme and goes in through code injection, so no theme files change.

Site-wide code sits under Settings → Advanced → Code injection, in the Site header or Site footer box. To try a snippet on one page first, paste it into the Code injection fields in that post's settings sidebar. Deleting the code removes the change. The code injection guide explains where each box prints its code.

All snippets