Hello,

I've recently discovered how to add syntax highlighting to the wiki
(http://wiki.github.com/dpp/liftweb).

First, you simply added this to the top of the article:
<link 
href='http://scala-tools.org/scaladocs/liftweb/1.0/_highlighter/SyntaxHighlighter.css'
rel='stylesheet' type='text/css'/>

Next, you added these two lines to the bottom of the page:
<script 
src='http://scala-tools.org/scaladocs/liftweb/1.0/_highlighter/shAll.js'></script>
<script>dp.SyntaxHighlighter.HighlightAll('code');</script>

Finally, just surround and code snippets with:
<pre name="code" class="scala:nocontrols">Your scala code...</pre>

FYI: Enabling syntax highlighting on github basically boils down to
importing a JS syntax highlighter into the page.  Currently, the wiki
is directly referencing the js highlighter on scala-tools.  Is that
okay?

Thanks,
Xavi

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to