Difference between revisions of "Help:Funtoo Editing Guidelines/Text Files"

From Funtoo
Jump to navigation Jump to search
(Created page with "=== Displaying Text File Contents === For displaying the contents of non-programming language text files (like config files), you have two options. You can enclose your lines...")
 
 
Line 1: Line 1:
=== Displaying Text File Contents ===
=== Displaying Text File Contents ===


For displaying the contents of non-programming language text files (like config files), you have two options. You can enclose your lines within {{c|<pre>}} tags, or use the new [[Template:File|file template]]. The file template is used like so:
For displaying the contents of non-programming language text files (like config files), you have two options. You can enclose your lines within {{c|&#60;pre&#62;}} tags, or use the new [[Template:File|file template]]. The file template (which we are rendering using {{c|<nowiki><pre></nowiki>}} tags!) is used like so:


<pre>
<pre>

Latest revision as of 03:20, February 24, 2019

Displaying Text File Contents

For displaying the contents of non-programming language text files (like config files), you have two options. You can enclose your lines within <pre> tags, or use the new file template. The file template (which we are rendering using <pre> tags!) is used like so:

{{file|name=/etc/foo.conf|desc=My foo.conf file|body=
# /etc/host.conf:
# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29
}}

This will produce:

   /etc/foo.conf - My foo.conf file
# /etc/host.conf:
# $Header: /var/cvsroot/gentoo/src/patchsets/glibc/extra/etc/host.conf,v 1.1 2006/09/29