UK-Archive.co.uk

SourceCode

page message .../SourceCode/SourceCode.py line 66: SourceCode Error: File './media/PyLucid/install_views.css' not found!
.../SourceCode/SourceCode.py line 66: SourceCode Error: File './media/PyLucid/install_views.css' not found!
.../SourceCode/SourceCode.py line 66: SourceCode Error: File './media/PyLucid/shared_sha_tools.js' not found!

PyLucid used the Python syntax highlighter "Pygments":http://pygments.pocoo.org/ . It supports an ever-growing range of languages, look at: http://pygments.pocoo.org/docs/lexers/

Markup source code

In Creole markup you can easy insert sourcecode: Use

<<code ext=".EXT">>...<</code>>
and PyLucid used Pygments to highlight it. Where '.EXT' is the typical fileextension/alias of the code, please look at:

examples

<<code ext=".css">>
/* CSS Stylesheet */
.xs {font-family:verdana,arial,helvetica,sans-serif;font-size: x-small}
.m {font-size: medium}
<</code>>

result:

CSS
1
2
3
/* CSS Stylesheet */
.xs {font-family:verdana,arial,helvetica,sans-serif;font-size: x-small}
.m {font-size: medium}

Here a "error" example:

unknown type
If there exist no Lexer for the given format, PyLucid used the Pygments TextLexer. =;-)

The other way is to use Creole {{{...}}} code block tags.

SourceCode Plugin

With the SourceCode Plugin you can integrate the source code of a local file into your CMS page.

example:

some examples:

./media/PyLucid/install_views.css:

./media/PyLucid/shared_sha_tools.js: