elzapp
elzapp

Reputation: 1991

How do I get syntax highlighting when using HTML as source in Pelican?

I recently started using the pelican cms, and I prefer to write my articles in HTML, as opposed to rst or markdown. Thats's fine. Pelican lets me do that.

But I can't seem to find any way to specify the language for <pre> blocks so Pelican will run it through Pygments to generate syntax higlighting.

The documentation only specifies how to do this with markdown or rst.

Upvotes: 1

Views: 241

Answers (1)

Avaris
Avaris

Reputation: 36735

That's because pelican itself doesn't use Pygments directly. It's applied through md and rst processors. As for HTML contents, pelican doesn't do anything except extracting the metadata from it. It's probably easier to use something like highlight.js.

Upvotes: 2

Related Questions