Help:Templates: Difference between revisions

imported>Samueldr
m Added the merge template
34j (talk | contribs)
Rename to Home Manager
 
(26 intermediate revisions by 8 users not shown)
Line 1: Line 1:
The wiki provides templates for common tasks.
<!--
NOTE: Do not link to META templates.
-->The wiki provides templates for common tasks.


Those templates can range from simple to complex, being almost invisible to the end-user to provide a complete harmonized template between articles.
Those templates can range from simple to complex, being almost invisible to the end-user to provide a complete harmonized template between articles.
Line 7: Line 9:
== Available templates==
== Available templates==


=== Article status ===
These templates are meant to be used across the whole wiki.


* [[Template:outdated]]
There are other section-specific templates, and templates for internal use available too.
* [[Template:expansion]]
* [[Template:merge]]


=== Note templates ===
=== Status notices ===


* [[Template:tip]]
'''Status notices''' are essential to our own housekeeping, as well as making the reader aware of certain caveats related to articles. They generally prompt the reader to contribute, edit, navigate or otherwise exercise caution when reading a certain article or section.
 
{| class="wikitable" style="width: 100%;"
! Template
! Example
! Notes
|-
| {{tl|disambiguation}}
| {{disambiguation|category=no|Help:Help}}
| Sometimes a single page can refer to more than one thing; use this template to link to the other pages
|-
| {{tl|merge}}
| {{merge|category=no|Help:Help}}
| If two pages are closely related, they might become merge candidates. Use this template to propose a page merger
|-
| {{tl|cleanup}}
| {{cleanup|category=no}}
| Use this to mark articles or pages that don't follow the [[Project:Manual of Style|Manual of Style]]
|-
| {{tl|low quality}}
| {{low quality|category=no}}
| Use this template to mark articles that are poorly written, are not substantial enough, or that have big issues and don't meet our standards of quality
|-
| {{template link|expand}}
| {{expand|category=no}}
| Use this template to mark articles that contain too little information
|-
| {{tl|outdated}}
| {{outdated|category=no}}
| When the information in an article becomes stale, you can use this template to prompt the user to take the information with a grain of salt, and prompt other editors to contribute by updating it.
|-
| {{tl|delete}}
| {{delete|category=no}}
| When the relevance of an article can be disputed, or is otherwise not needed on the wiki, it can be proposed for deletion. In that case, this template is to be used.
|}
 
=== Notice templates ===
 
In general, there are two kinds of notes you can use: ''big'' and ''small'' notices. '''Small notices''' integrate well within the flow of the text, and are meant to convey information that shouldn't distract too much from the reading flow. The table below shows the main small notes available:
 
{| class="wikitable" style="width: 100%;"
! Template
! Example
! Notes
|-
| {{template link|note}}
| {{note|This is some important information}}
| To be used for important information that shouldn't break the reading flow.
|-
| {{template link|aside}}
| {{aside|This information is not that important.}}
| To be used for related information that is not essential for the main body of an article.
|}
 
'''Big notices''' are purposefully disruptive, and are meant to capture a reader's attention. Use these to convey information that should be read first, especially when the user is glancing over a page without reading it in detail.
 
{| class="wikitable" style="width: 100%;"
! Template
! Example
! Notes
|-
| {{template link|tip}}
| {{tip|Something you might easily miss}}
| To be used for quick reminders that users often miss.
|-
| {{template link|info}}
| {{info|Some key information you should be aware of}}
| To be used for bringing key information to the reader's attention.
|-
| {{template link|warning}}
| {{warning|This information is highly important.}}
| To be used for marking potentially dangerous, disruptive or destructive actions.
|-
| {{template link|security Warning}}
| {{security Warning|category=no|This information is paramount.}}
| To be used for marking key security concerns.
|}


=== Prefab tips ===
=== Prefab tips ===


* [[Template:evaluate]]
Common repeated tips in template form.
 
* [[Template:evaluate|<nowiki>{{evaluate}}</nowiki>]] reminder to evaluate a NixOS configuration with {{ic|nixos-rebuild}}.
* [[Template:unfree|<nowiki>{{unfree}}</nowiki>]] a note that a package is unfree, with a link for more help.


=== Formatting ===
=== Formatting ===


* [[Template:commands]]
==== Misc. prefabs ====
* [[Template:file]]
 
* [[Template:app|<nowiki>{{app}}</nowiki>]] for a ''card'' with details about an application.
* [[Template:man|<nowiki>{{man}}</nowiki>]] to refer to a man page (and section).
 
==== Code and commands ====
 
* [[Template:commands|<nowiki>{{commands}}</nowiki>]] for a list of commands.
* [[Template:file|<nowiki>{{file}}</nowiki>]] for a formatted code block with a filename header.
* Prefer the SyntaxHighlight extension with e.g. <code><nowiki><syntaxhighlight lang="nix"></syntaxhighlight></nowiki></code> otherwise.
 
These are more raw implementation blocks. They are not recommended for broad use.
 
* [[Template:ic|<nowiki>{{ic}}</nowiki>]] for '''inline code'''.
* [[Template:bc|<nowiki>{{bc}}</nowiki>]] for a '''block''' of '''code'''.
 
=== Nix, Nixpkgs and NixOS ===
 
These helpers link to specific project parts.
 
==== Nix ====
 
* [[Template:nix:option|<nowiki>{{nix:option}}</nowiki>]] links to a given '''Nix''' option documentation.
* [[Template:Nix Manual|<nowiki>{{Nix Manual}}</nowiki>]] links to the '''Nix''' manual (with optional chapter and version).
 
==== Nixpkgs ====
 
* [[Template:Nixpkgs Link|<nowiki>{{Nixpkgs Link}}</nowiki>]] links to a given Nixpkgs file (with optional revision).
* [[Template:Nixpkgs Manual|<nowiki>{{Nixpkgs Manual}}</nowiki>]] links to the Nixpkgs manual (with optional chapter and version).
 
==== NixOS ====
 
* [[Template:nixos:package|<nowiki>{{nixos:package}}</nowiki>]] links to a given NixOS package search result.
* [[Template:nixos:option|<nowiki>{{nixos:option}}</nowiki>]] links to a given NixOS option search result.
* [[Template:NixOS Manual|<nowiki>{{NixOS Manual}}</nowiki>]] links to the NixOS manual (with optional chapter and version).
 
==== Other links ====
 
* [[Template:issue|<nowiki>{{issue}}</nowiki>]] to link to a Nixpkgs issue.
* [[Template:pull|<nowiki>{{pull}}</nowiki>]] to link to a Nixpkgs pull request.
* [[Template:home manager|<nowiki>{{home manager}}</nowiki>]] links to a given Home Manager option search result.
 
=== Page construction ===


=== Links ===
Templates helping in building pages with common forms.


* [[Template:issue]]
* [[Template:lowercase title|<nowiki>{{lowercase title}}</nowiki>]] to lowercase the first character of a page name.
* [[Template:main|<nowiki>{{main}}</nowiki>]] to refer back to a main article.
* [[Template:PrefixIndex|<nowiki>{{PrefixIndex}}</nowiki>]] to add a list of pages starting with a given prefix.


== Visual Guidelines ==
== Visual Guidelines ==


The icons used are from [https://community.kde.org/KDE_Visual_Design_Group/HIG/IconDesign Breeze, the default icon set of KDE].
The icons used are from [https://develop.kde.org/hig/icons Breeze, the default icon set of KDE].


Since the icons from Breeze are used, the [https://community.kde.org/KDE_Visual_Design_Group/HIG/Color colours from HIG], which is the ''Breeze Color Palette'' are used.  
Since the icons from Breeze are used, the [https://develop.kde.org/hig/status_changes/#color colours from HIG], which is the ''Breeze Color Palette'' are used.  


Sometimes, there isn't an icon in the Breeze theme that can be used for the purpose. In this case, alternative free and open source icons can be used. Once a stand-in is used, someone with the necessary skills can create the needed icon in the breeze style.
Sometimes, there isn't an icon in the Breeze theme that can be used for the purpose. In this case, alternative free and open source icons can be used. Once a stand-in is used, someone with the necessary skills can create the needed icon in the breeze style.
== Magic words ==
{{main|Help:Magic words}}
There are a number of syntax elements in MediaWiki that have special functionality, usually relevant to how the page is presented to the reader, but also useful in template development. Read more on the [[Help:Magic words|magic words help page]].
== See also ==
* [https://wiki.nixos.org/wiki/Special:AllPages?from=&to=&namespace=10 List of all templates]
[[Category:Contributions]]