Help:Template: Difference between revisions

From NixOS Wiki
imported>Flexagoon
No edit summary
fix urls for kde hig
 
(10 intermediate revisions by 3 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 6: Line 8:


== Available templates==
== Available templates==
These templates are meant to be used across the whole wiki.
There are other section-specific templates, and templates for internal use available too.


=== Article status ===
=== Article status ===


* [[Template:outdated]]
These templates should be added to either the top of a page, or the top of a section, when needed.
* [[Template:expansion]]
 
* [[Template:merge]]
* [[Template:outdated|<nowiki>{{outdated}}</nowiki>]] for when a page or a section is outdated.
* [[Template:expansion|<nowiki>{{expansion}}</nowiki>]] for when a page or section needs expansion.
* [[Template:merge|<nowiki>{{merge}}</nowiki>]] for when a a page or a section may need to be merged into another.
* [[Template:disambiguation|<nowiki>{{disambiguation}}</nowiki>]] for when a page name is ambiguous, to link to another.
* [[Template:low quality|<nowiki>{{low quality}}</nowiki>]] for when a page or a section is of low quality.


=== Note templates ===
=== Note templates ===


* [[Template:tip]]
These templates are purposefully intrusive, and serve as a visual landmark to an important note.
* [[Template:note]]
 
* [[Template:warning]]
* [[Template:tip|<nowiki>{{tip}}</nowiki>]] for a tip.
* [[Template:warning|<nowiki>{{warning}}</nowiki>]] for a non-security warning.
* [[Template:Security Warning|<nowiki>{{Security Warning}}</nowiki>]] for a security warning.
 
These templates should be used sparingly, but are useful as they are less intrusive.
 
* [[Template:note|<nowiki>{{note}}</nowiki>]] for a note.
* [[Template:aside|<nowiki>{{aside}}</nowiki>]] for an aside comment about a section.


=== 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:ic]]
* [[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.


=== Links ===
=== Page construction ===


* [[Template:issue]]
Templates helping in building pages with common forms.
* [[Template:pull]]
 
* [[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.
Line 44: Line 104:
== See also ==
== See also ==


* [https://nixos.wiki/wiki/Special:AllPages?from=&to=&namespace=10 List of all templates]
* [https://wiki.nixos.org/wiki/Special:AllPages?from=&to=&namespace=10 List of all templates]
 
[[Category:Contributions]]

Latest revision as of 18:39, 14 September 2024

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.

In addition to the visual aspect, using some templates will automatically file and categorize articles in ways indispensable to the end-users.

Available templates

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

There are other section-specific templates, and templates for internal use available too.

Article status

These templates should be added to either the top of a page, or the top of a section, when needed.

Note templates

These templates are purposefully intrusive, and serve as a visual landmark to an important note.

These templates should be used sparingly, but are useful as they are less intrusive.

Prefab tips

Common repeated tips in template form.

  • {{evaluate}} reminder to evaluate a NixOS configuration with nixos-rebuild.
  • {{unfree}} a note that a package is unfree, with a link for more help.

Formatting

Misc. prefabs

  • {{app}} for a card with details about an application.
  • {{man}} to refer to a man page (and section).

Code and commands

  • {{commands}} for a list of commands.
  • {{file}} for a formatted code block with a filename header.
  • Prefer the SyntaxHighlight extension with e.g. <syntaxhighlight lang="nix"></syntaxhighlight> otherwise.

These are more raw implementation blocks. They are not recommended for broad use.

Nix, Nixpkgs and NixOS

These helpers link to specific project parts.

Nix

Nixpkgs

NixOS

Other links

Page construction

Templates helping in building pages with common forms.

Visual Guidelines

The icons used are from Breeze, the default icon set of KDE.

Since the icons from Breeze are used, the 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.

See also