Help:Editing: Difference between revisions
m Reword syntaxhighlight usage |
"review" |
||
Line 3: | Line 3: | ||
== Article tone == | == Article tone == | ||
Use a more | Use a more ''descriptive'' tone, where concepts and instructions are described and explained first. A ''prescriptive'' tone should be avoided. Here's an example: | ||
{| class="wikitable" | |||
|- | |||
! Prescriptive | |||
! Descriptive | |||
|- | |||
| width=50% valign=top | | |||
'''How to deal with full <code>/boot</code> in case of EFI''' | |||
systemd-boot (gummiboot) can't store kernels, initrd and other big stuff on root partition, so switch to grub | |||
| width=50% valign=top | | |||
'''Keeping kernels/initrd on the main partition''' | |||
For these instructions, GRUB will be required; systemd-boot cannot reference boot files from the root partition. This will differ from the default expectation of NixOS on EFI, where <code>/boot/</code> is the <code>ESP</code>. | |||
|- | |||
|} | |||
On the prescriptive side, the title doesn't describe the achieved end-result; the text tells the reader to switch to grub without explaining what the following (elided) configuration does. | On the prescriptive side, the title doesn't describe the achieved end-result; the text tells the reader to switch to grub without explaining what the following (elided) configuration does. | ||
Line 25: | Line 30: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Section | |||
! Description | |||
|- | |||
| See also | |||
| References inside and outside the wiki. Prefer textual links with a description than naked URLs. | |||
|- | |||
| References | |||
| The last section, when needed, where <code><references /></code> sections will output the references. | |||
|- | |||
|} | |||
== Code == | == Code == | ||
Inline code can be typeset with {{ic|<nowiki>{{ic|...}}</nowiki>}} or <code><nowiki><code>...</code></nowiki></code>. A block of code is obtained with: | Inline code can be typeset with {{ic|<nowiki>{{ic|...}}</nowiki>}} or <code><nowiki><code>...</code></nowiki></code>. A block of code is obtained with: | ||
{{bc|<nowiki>{{bc|...}}</nowiki>}} | {{bc|<nowiki>{{bc|...}}</nowiki>}} | ||
Line 44: | Line 51: | ||
{{bc|<nowiki><syntaxhighlight lang="...">...</syntaxhighlight></nowiki>}} | {{bc|<nowiki><syntaxhighlight lang="...">...</syntaxhighlight></nowiki>}} | ||
See [ | See [[mediawikiwiki:Extension:SyntaxHighlight]] for help. | ||
=== Examples of <code>lang="..."</code> === | === Examples of <code>lang="..."</code> === | ||
Line 52: | Line 59: | ||
* For console snippets use <code>lang="console"</code>. <tt>root</tt> prompts are conventionally indicated with {{ic|#}}, while non-root prompts look like {{ic|$}}. <code>lang="console"</code> highlights such prompts correctly, while <code>lang="bash"</code> treats {{ic|#}} as the beginning of a comment, as it is intended for scripts. | * For console snippets use <code>lang="console"</code>. <tt>root</tt> prompts are conventionally indicated with {{ic|#}}, while non-root prompts look like {{ic|$}}. <code>lang="console"</code> highlights such prompts correctly, while <code>lang="bash"</code> treats {{ic|#}} as the beginning of a comment, as it is intended for scripts. | ||
== | == References == | ||
: aka citations | |||
This wiki uses the widely used [[mediawikiwiki:Extension:Cite]] for handling footnotes. It provides the tags | |||
* <code><nowiki><ref></nowiki></code> | |||
*: begin a reference (citation), | |||
* <code><nowiki></ref></nowiki></code> | |||
*: end a reference (citation) and | |||
* <code><nowiki><references /></nowiki></code> | |||
*: list all references (citations). | |||
Much more information is available at [[mediawikiwiki:Help:Cite]]. | |||
== See also == | == See also == | ||
* [ | * [[mediawikiwiki:Help:Formatting]], the upstream documentation. | ||
* [ | * [[wikibooks:Editing Wikitext]], a book about editing wikitext. | ||
* [ | * [[mediawikiwiki:Help:Section]]. While about the wikimedia wikis, these documents may help with some peculiarities about mediawiki. | ||
* [ | * [[mediawikiwiki:Category:Pages with syntax highlighting errors]], which describes several common syntax highlighting mistakes. |
Revision as of 15:25, 5 May 2024
Article tone
Use a more descriptive tone, where concepts and instructions are described and explained first. A prescriptive tone should be avoided. Here's an example:
Prescriptive | Descriptive |
---|---|
How to deal with full systemd-boot (gummiboot) can't store kernels, initrd and other big stuff on root partition, so switch to grub |
Keeping kernels/initrd on the main partition For these instructions, GRUB will be required; systemd-boot cannot reference boot files from the root partition. This will differ from the default expectation of NixOS on EFI, where |
On the prescriptive side, the title doesn't describe the achieved end-result; the text tells the reader to switch to grub without explaining what the following (elided) configuration does.
Titles
Capitalize only the first word.
Common sections
Some sections are common across the wiki. For consistency, their names are documented here.
Section | Description |
---|---|
See also | References inside and outside the wiki. Prefer textual links with a description than naked URLs. |
References | The last section, when needed, where sections will output the references.
|
Code
Inline code can be typeset with {{ic|...}}
or <code>...</code>
. A block of code is obtained with:
{{bc|...}}
or
<pre>...</pre>
or, often preferable:
<syntaxhighlight lang="...">...</syntaxhighlight>
See mediawikiwiki:Extension:SyntaxHighlight for help.
Examples of lang="..."
lang="nix"
can be used to highlight Nix expressions.lang="html+handlebars"
may be used to highlight wikitext.- For console snippets use
lang="console"
. root prompts are conventionally indicated with#
, while non-root prompts look like$
.lang="console"
highlights such prompts correctly, whilelang="bash"
treats#
as the beginning of a comment, as it is intended for scripts.
References
- aka citations
This wiki uses the widely used mediawikiwiki:Extension:Cite for handling footnotes. It provides the tags
<ref>
- begin a reference (citation),
</ref>
- end a reference (citation) and
<references />
- list all references (citations).
Much more information is available at mediawikiwiki:Help:Cite.
See also
- mediawikiwiki:Help:Formatting, the upstream documentation.
- wikibooks:Editing Wikitext, a book about editing wikitext.
- mediawikiwiki:Help:Section. While about the wikimedia wikis, these documents may help with some peculiarities about mediawiki.
- mediawikiwiki:Category:Pages with syntax highlighting errors, which describes several common syntax highlighting mistakes.