Insight
Optimize Your Ghost CMS Site’s Navigation: Make External Links Open in New Tabs
A small Ghost navigation improvement that can make the site experience cleaner and less disruptive.
How to improve code presentation inside Ghost blogs with cleaner syntax highlighting.
Are your code snippets lost in a sea of plain text on your Ghost blog? Elevate their impact and readability with Prism.js. This simple tool makes code more readable and more enjoyable for technical readers.
Go to Settings > Code Injection in Ghost Admin.
Add this stylesheet in the Site Header:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.x.x/themes/prism.min.css" />Then add Prism in the Site Footer:
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.x.x/prism.min.js"></script>For language-specific support, load the components you need. For example, JavaScript:
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.x.x/components/prism-javascript.min.js"></script>If you want fuller control, download Prism from the official download page and place the generated files inside your theme.
Add the CSS in default.hbs:
<link rel="stylesheet" type="text/css" href="{{asset \"css/prism.css\"}}" />Then load the JavaScript before the closing body tag:
<script type="text/javascript" src="{{asset \"js/prism.js\"}}"></script>Wrap your code in fenced blocks and specify the language:
```javascript
function sayHello(name) {
console.log(`Hello, ${name}!`);
}
```Replace javascript with the language you actually need, such as css or python.
With the right syntax highlighting in place, technical content becomes easier to scan, more credible, and more useful for your readers.
Insight
A small Ghost navigation improvement that can make the site experience cleaner and less disruptive.
Insight
How to improve code presentation inside Ghost blogs with cleaner syntax highlighting.
Insight
A cleaner way to handle footnotes and references in Ghost-powered publishing.
Insight
A practical guide to using Ghost webhooks for automation and connected workflows.
Thanks. We received your message and will get back to you soon.