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
Convert instances of the File template, currently found in these articles, as follows:

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
Convert instances of the Code template, currently found in these articles, as follows:

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, currently found in these articles, works similarly to the Code template, just without syntax highlighting support. As such,  tags can still be used. As of 23 January 2017, all instances of this template have been converted (but you can check the link to see if that's still true).

Mini FAQ

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

As always, if you have any questions or find any problems stop by the IRC channel, or email us (at ). If not, thanks for your help making the Wiki even better. :)