Project:Wiki/Archive/Template migrations/Code, File, Kernel

We are deprecating the currently widely-used Code, File, and Kernel templates in favor of CodeBox, FileBox, and KernelBox for these reasons:


 * The new names explicitly tell the author that they produce block-level elements with a border (=box) and are explicitly not inline templates.
 * The 'API' was changed to only have the box contents as anonymous required parameter. All other parameters are named, making the template more flexible.
 * Syntax highlighting support was properly implemented.

Some of these changes require manual verification of the rendered result, as well as annotating with a source language, and we hope you can assist us with this.

What do I need to do?
Basically, for every Code, File, or Kernel template you find:


 * add "Box" to the template name
 * convert the title into a named argument (if there is one)
 * convert the file name into a named argument (if there is one)
 * set a source language (here is a list of available languages)

File
Old Template:

New template:

Using  is no longer needed, the template takes care of preserving the whitespace on its own. Should you need to escape contents, use  or. (Note that keeping the  tag will break syntax highlighting.)

Code
Old Template:

GRUB_GFXMODE=1366x768x32
 * 1) Set resolution and color depth

GRUB_GFXPAYLOAD_LINUX=keep &lt;/pre> New template:
 * 1) Keep resolution when loading the kernel

You can discard the empty title parameter as there is no title, just add the source language, and use  instead of.

Kernel
The Kernel template works similarly to the Code template, just without syntax highlighting support. As such,  tags can still be used.

Mini FAQ

 * What do I do with  characters?
 * Replace them with

As always, please stop by on IRC, or email us (wiki@gentoo.org) if you have any questions or problems. If not, thanks for your help to make our Wiki even better. :)