Include syntax highlighting?

Asked by Dennis Benzinger

Can you include syntax highlighting in Silva?
I want to include code samples in various programming languages into my site
and want them to be highlighted automatically (for example by Pygments

Question information

English Edit question
Silva Edit question
No assignee Edit question
Solved by:
Eric Casteleijn
Last query:
Last reply:
Revision history for this message
Best Eric Casteleijn (thisfred) said :

there is currently nothing to do this in silva, but it probably shouldn't be very hard to create a 'code source' to do it. Code sources are dynamic elements you can put into Silva Documents.

Revision history for this message
Eric Casteleijn (thisfred) said :

Note that the name code source may be confusing here it has nothing to do with displaying code, per se, it's just something that can actually use code to generate dynamic pieces of a page.

Revision history for this message
Dennis Benzinger (dennis-benzinger) said :

Thanks thisfred, that solved my question.

Revision history for this message
Tuomas Tonteri (tuomas-tonteri) said :

Doesn't this mean having to input and edit the code in a small kupu side panel? Or can a code source have a editable field inside the main editing area?

Revision history for this message
Andy Altepeter (aaltepet) said :

I spoke with Tuomas in the Silva IRC channel and we determined that marking the code source as "elaborate" (causing the params to open in a new window when adding / editing in kupu) was sufficient.