Jump to content

Template:Manual/Doc: Difference between revisions

From NixOS Wiki
DoggoBit (talk | contribs)
Created page with "Use this template to provide links to the manuals in the Nix ecosystem: Nix reference manual, Nixpkgs manual and NixOS manual. {{manual|nix|installation/index}} === Usage === Provide the tool and the path which you want to link as arguments for the template. For example, to link the manual page at <code>nix.dev/manual/nix/stable/installation/index.html</code>, include just the <code>installation/index</code> part: {{code|lang=mediawiki|line=no|<nowiki>{{manual|nix|in..."
 
DoggoBit (talk | contribs)
Document template
 
Line 1: Line 1:
Use this template to provide links to the manuals in the Nix ecosystem: Nix reference manual, Nixpkgs manual and NixOS manual.
Use this template to provide links to the manuals in the Nix ecosystem: Nix reference manual, Nixpkgs manual and NixOS manual.


{{manual|nix|installation/index}}
{{manual|nix|installation/index|Installation}}


=== Usage ===
=== Usage ===
Line 7: Line 7:
Provide the tool and the path which you want to link as arguments for the template. For example, to link the manual page at <code>nix.dev/manual/nix/stable/installation/index.html</code>, include just the <code>installation/index</code> part:
Provide the tool and the path which you want to link as arguments for the template. For example, to link the manual page at <code>nix.dev/manual/nix/stable/installation/index.html</code>, include just the <code>installation/index</code> part:


{{code|lang=mediawiki|line=no|<nowiki>{{manual|nix|installation/index}}</nowiki>}}
{{code|lang=mediawiki|line=no|<nowiki>{{manual|nix|installation/index|Installation}}</nowiki>}}
 
In cases where you need to link to a specific subsection on the manual page, you can use the appropriate parameter:
 
{{code|lang=mediawiki|line=no|<nowiki>{{manual|nix|installation/index|Installation|subsection=multi-user}}</nowiki>}}
 
{{manual|nix|installation/index|Installation|subsection=multi-user}}
<includeonly>
=== Template data ===
<templatedata>
{
  "description": "Insert a link to one of the Nix manuals.",
  "params": {
    "1": {
      "label": "Manual",
      "description": "The manual to link to.",
      "required": true,
      "type": "string",
      "suggestedvalues": [
        "nix",
        "nixos",
        "nixpkgs"
      ]
    },
    "2": {
      "label": "Section",
      "description": "The section to link to.",
      "required": true,
      "type": "string"
    },
    "3": {
      "label": "Display text",
      "description": "The text to display in the link.",
      "required": true,
      "type": "string"
    },
    "subsection": {
      "label": "Subsection",
      "description": "The subsection to link to. Only applies to the Nix reference manual.",
      "type": "string"
    }
  }
}
</templatedata></includeonly>

Latest revision as of 20:06, 14 June 2025

Use this template to provide links to the manuals in the Nix ecosystem: Nix reference manual, Nixpkgs manual and NixOS manual.

📖︎ Installation

Usage

Provide the tool and the path which you want to link as arguments for the template. For example, to link the manual page at nix.dev/manual/nix/stable/installation/index.html, include just the installation/index part:

{{manual|nix|installation/index|Installation}}

In cases where you need to link to a specific subsection on the manual page, you can use the appropriate parameter:

{{manual|nix|installation/index|Installation|subsection=multi-user}}

📖︎ Installation