PyLucid CMS Logo

highlight source code

page message
  • Entry for this url doesn't exist.

There exist different ways for highlight sourcecode with pygments:

↑ sourcecode django tag  #

example:

HTML+Django/Jinja
1
2
3
{% sourcecode ext=".py" %}
print "Python is cool!"
{% endsourcecode %}

result:

Python
1
print "Python is cool!"

Info:

↑ creole markup macro  #

PyLucid has a creole markup macro for highlighting:

<<code ext=.FOO>>...<</code>>

(Where FOO is the fileextension of the sourcecode)

example:

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

output is:

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

Important:

↑ generate html code for copy&paste  #

You can generate html code for copy&paste into page content with:

E.g.: with Creole markup, put the generated html code into:
<<html>>...<</html>>

Info:

0 comments for 'highlight code':
    there exist no comment for 'highlight code'
Leave a comment

django-processinfo: 5.0 ms of 241.1 ms (2.1%)