Source: 63ed317ce2b8760008fb2e0a--sebastiandedeyne-com-e11d52.netlify.app

Better code highlighting in Hugo with Torchlight
In this post, I’ll explain how I set up Torchlight CLI for my Hugo site. Torchlight is a code-highlighter-as-a-service built on Visual Studio Code’s editor highlighter editor.

To set up Torchlight with Hugo, we’ll need to follow a few steps: Register on torchlight.dev and generate an API token Install Torchlight CLI Configure Torchlight Update our deploy script

For a static site, Torchlight CLI is the most straightforward way to get going.

highlight.output: This is where Torchlight CLI will store the highlighted HTML files, it’s empty so Torchlight will overwrite the input files.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners