Include syntax highlighting?

Asked by Dennis Benzinger on 2008-01-31

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:
Best Eric Casteleijn (thisfred) said : #1

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.

Eric Casteleijn (thisfred) said : #2

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.

Thanks thisfred, that solved my question.

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?

Andy Altepeter (aaltepet) said : #5

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.