Note
The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Help:Funtoo Editing Guidelines/Source Code
Jump to navigation
Jump to search
Displaying Source Code
To display source code, use can use the file template, specifying a lang= parameter:
{{file|name=foobar|lang=python|desc=foobarosity|body= import system }}
This will produce:
foobar
(python source code) - foobarosityimport system
The parameters name
(filename), lang
(language for syntax highlighting) and desc
(Description, appearing as a caption) are optional. For a list of supported languages, see this list.
Important
If you need to display the pipe ("|") character within the body of a file template, replace each "|" with {{!}} -- otherwise your file contents will not display properly. This is necessary because {{file}} is a template and the "|" character is used as a delimiter for arguments to the template.