Template:TutorialMeta: Difference between revisions
More actions
No edit summary  |
Add <templatedata> for Visual Editor Usage. |
||
| Line 17: | Line 17: | ||
=== Parameters === | === Parameters === | ||
; <code>name</code> : Tutorial display name shown on the hub card. Defaults to the page name. | ; <code>name</code> : Tutorial display name shown on the hub card. Defaults to the page name. | ||
; <code>topic</code> : One or more topics, comma-separated (e.g. <code>Audio</code> or <code>Audio, Software</code>) | ; <code>topic</code> : One or more topics, comma-separated (e.g. <code>Audio</code> or <code>Audio, Software</code>). Valid values: Audio, Digital Arts, Games, Handicrafts, Photography, Software, Video, Writing, World Building. | ||
; <code>difficulty</code> : Difficulty level shown as a coloured badge. Values: <code>Beginner</code>, <code>Intermediate</code>, <code>Advanced</code>. Defaults to Beginner. | ; <code>difficulty</code> : Difficulty level shown as a coloured badge. Values: <code>Beginner</code>, <code>Intermediate</code>, <code>Advanced</code>. Defaults to Beginner. | ||
; <code>description</code> : Short description shown on the tutorial card hover. Keep to 1–2 sentences. | ; <code>description</code> : Short description shown on the tutorial card hover. Keep to 1–2 sentences. | ||
; <code>tags</code> : Space-separated keywords | ; <code>tags</code> : Space-separated keywords for filtering within tutorial sections. | ||
; <code>image</code> : Cover image filename | ; <code>image</code> : Cover image filename without <code>File:</code> prefix. Upload via [[Special:Upload]] first. | ||
=== Notes === | === Notes === | ||
* The page is automatically tagged into <code><nowiki>[[Category:Tutorials]]</nowiki></code> and <code><nowiki>[[Category:Tutorials/Audio]]</nowiki></code> etc | * The page is automatically tagged into <code><nowiki>[[Category:Tutorials]]</nowiki></code> and <code><nowiki>[[Category:Tutorials/Audio]]</nowiki></code> etc. | ||
* After saving, the tutorial appears on the hub within seconds (Cargo job queue). | * After saving, the tutorial appears on the hub within seconds (Cargo job queue). | ||
 | |||
<templatedata> | |||
{ | |||
  "description": "Registers a tutorial in the Cargo database so it appears on the Tutorials hub. Also auto-categorises the page. Place at the top of every tutorial page.", | |||
  "params": { | |||
    "name": { | |||
      "label": "Tutorial name", | |||
      "description": "Display name shown on the hub card. Defaults to the page name.", | |||
      "type": "string", | |||
      "default": "{{PAGENAME}}", | |||
      "required": false | |||
    }, | |||
    "topic": { | |||
      "label": "Topic(s)", | |||
      "description": "One or more topics, comma-separated (e.g. Audio or Audio, Software).", | |||
      "type": "string", | |||
      "suggestedvalues": ["Audio", "Digital Arts", "Games", "Handicrafts", "Photography", "Software", "Video", "Writing", "World Building"], | |||
      "required": true | |||
    }, | |||
    "difficulty": { | |||
      "label": "Difficulty", | |||
      "description": "Difficulty level shown as a coloured badge on the card.", | |||
      "type": "string", | |||
      "default": "Beginner", | |||
      "suggestedvalues": ["Beginner", "Intermediate", "Advanced"], | |||
      "required": false | |||
    }, | |||
    "description": { | |||
      "label": "Description", | |||
      "description": "Short description shown on the tutorial card hover. Keep to 1-2 sentences.", | |||
      "type": "content", | |||
      "required": false | |||
    }, | |||
    "tags": { | |||
      "label": "Tags", | |||
      "description": "Space-separated keywords for filtering within tutorial sections.", | |||
      "type": "string", | |||
      "required": false | |||
    }, | |||
    "image": { | |||
      "label": "Cover image", | |||
      "description": "Cover image filename without the File: prefix (e.g. MyThumbnail.png). Upload via Special:Upload first.", | |||
      "type": "wiki-file-name", | |||
      "required": false | |||
    } | |||
  }, | |||
  "format": "block" | |||
} | |||
</templatedata> | |||
{{#cargo_declare: | {{#cargo_declare: | ||
Revision as of 08:30, 23 March 2026
TutorialMeta
Stores tutorial metadata into the Cargo database (Tutorials table) so it appears on the Tutorials hub under the correct topic section. Also auto-tags the page into the relevant categories. Place at the top of every tutorial page.
Usage
{{TutorialMeta
| name = How to Record Field Audio on a Budget
| topic = Audio
| difficulty = Beginner
| description = A short description shown on the hub card (1–2 sentences).
| tags = audio recording field budget beginner
| image = MyThumbnailImage.png
}}
Parameters
name- Tutorial display name shown on the hub card. Defaults to the page name.
topic- One or more topics, comma-separated (e.g.
AudioorAudio, Software). Valid values: Audio, Digital Arts, Games, Handicrafts, Photography, Software, Video, Writing, World Building. difficulty- Difficulty level shown as a coloured badge. Values:
Beginner,Intermediate,Advanced. Defaults to Beginner. description- Short description shown on the tutorial card hover. Keep to 1–2 sentences.
tags- Space-separated keywords for filtering within tutorial sections.
image- Cover image filename without
File:prefix. Upload via Special:Upload first.
Notes
- The page is automatically tagged into
[[Category:Tutorials]]and[[Category:Tutorials/Audio]]etc. - After saving, the tutorial appears on the hub within seconds (Cargo job queue).
Registers a tutorial in the Cargo database so it appears on the Tutorials hub. Also auto-categorises the page. Place at the top of every tutorial page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Tutorial name | name | Display name shown on the hub card. Defaults to the page name.
| String | optional |
| Topic(s) | topic | One or more topics, comma-separated (e.g. Audio or Audio, Software).
| String | required |
| Difficulty | difficulty | Difficulty level shown as a coloured badge on the card.
| String | optional |
| Description | description | Short description shown on the tutorial card hover. Keep to 1-2 sentences. | Content | optional |
| Tags | tags | Space-separated keywords for filtering within tutorial sections. | String | optional |
| Cover image | image | Cover image filename without the File: prefix (e.g. MyThumbnail.png). Upload via Special:Upload first. | File | optional |
This template defines the table "Tutorials". View table.