Template:TutorialMeta: Difference between revisions
Template page
More actions
No edit summary  |
Changes made to align with the new hub revamp. Replaced topics with tags, removed difficulty. Â |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
== TutorialMeta == | == TutorialMeta == | ||
Stores tutorial metadata into the Cargo database ( | Stores tutorial metadata into the Cargo database ('''Tutorials''' table) so it | ||
appears on the [[Tutorials]] hub. Place at the top of every tutorial page. | |||
=== Usage === | === Usage === | ||
| Line 7: | Line 8: | ||
{{TutorialMeta | {{TutorialMeta | ||
| name    = How to Record Field Audio on a Budget | | name    = How to Record Field Audio on a Budget | ||
| description = A short description shown on the hub card (1–2 sentences). | | description = A short description shown on the hub card (1–2 sentences). | ||
| tags    = audio recording field | | tags    = audio, recording, beginner, field-recording | ||
| image   = MyThumbnailImage.png | | image   = MyThumbnailImage.png | ||
}} | }} | ||
| Line 16: | Line 15: | ||
=== Parameters === | === Parameters === | ||
; <code>name</code> : Tutorial display name | ; <code>name</code> : Tutorial display name. Defaults to the page name. | ||
; <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> : | ; <code>tags</code> : Comma-separated tags for filtering and searching. Include topic tags (e.g. <code>audio</code>, <code>software</code>) and difficulty tags (e.g. <code>beginner</code>, <code>intermediate</code>, <code>advanced</code>). | ||
; <code>image</code> : Cover image filename without <code>File:</code> prefix. Upload via [[Special:Upload]] first. | |||
=== Notes === | === Notes === | ||
* | * Difficulty is now handled via tags — add <code>beginner</code>, <code>intermediate</code>, or <code>advanced</code> to the tags field. | ||
* 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. Place at the top of every tutorial page.", | |||
  "params": { | |||
    "name": { | |||
      "label": "Tutorial name", | |||
      "description": "Display name. Defaults to the page name.", | |||
      "type": "string", | |||
      "default": "{{PAGENAME}}", | |||
      "required": false | |||
    }, | |||
    "description": { | |||
      "label": "Description", | |||
      "description": "Short description shown on the tutorial card hover.", | |||
      "type": "content", | |||
      "required": false | |||
    }, | |||
    "tags": { | |||
      "label": "Tags", | |||
      "description": "Comma-separated tags. Include topic and difficulty tags (e.g. audio, beginner, synthesis).", | |||
      "type": "string", | |||
      "required": false | |||
    }, | |||
    "image": { | |||
      "label": "Cover image", | |||
      "description": "Cover image filename without File: prefix.", | |||
      "type": "wiki-file-name", | |||
      "required": false | |||
    } | |||
  }, | |||
  "format": "block" | |||
} | |||
</templatedata> | |||
{{#cargo_declare: | {{#cargo_declare: | ||
  _table   = Tutorials |   _table   = Tutorials | ||
| name    = String | | name    = String | ||
| description = Text | | description = Text | ||
| image   = File | | image   = File | ||
| Line 40: | Line 68: | ||
[[Category:Cargo Templates]] | [[Category:Cargo Templates]] | ||
[[Category:Layout Templates]] | [[Category:Layout Templates]] | ||
</noinclude | </noinclude><includeonly>{{#cargo_store: | ||
  _table   = Tutorials |   _table   = Tutorials | ||
| name    = {{{name|{{PAGENAME}}}}} | | name    = {{{name|{{PAGENAME}}}}} | ||
| description = {{{description|}}} | | description = {{{description|}}} | ||
| image   = {{{image|}}} | | image   = {{{image|}}} | ||
| tags    = {{{tags|}}} | | tags    = {{{tags|}}} | ||
}}[[Category:Tutorials]] | }}[[Category:Tutorials]]</includeonly> | ||
Latest revision as of 00:16, 2 April 2026
TutorialMeta
Stores tutorial metadata into the Cargo database (Tutorials table) so it appears on the Tutorials hub. Place at the top of every tutorial page.
Usage
{{TutorialMeta
| name = How to Record Field Audio on a Budget
| description = A short description shown on the hub card (1–2 sentences).
| tags = audio, recording, beginner, field-recording
| image = MyThumbnailImage.png
}}
Parameters
name- Tutorial display name. Defaults to the page name.
description- Short description shown on the tutorial card hover. Keep to 1–2 sentences.
tags- Comma-separated tags for filtering and searching. Include topic tags (e.g.
audio,software) and difficulty tags (e.g.beginner,intermediate,advanced). image- Cover image filename without
File:prefix. Upload via Special:Upload first.
Notes
- Difficulty is now handled via tags — add
beginner,intermediate, oradvancedto the tags field. - 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. Place at the top of every tutorial page.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Tutorial name | name | Display name. Defaults to the page name.
| String | optional |
| Description | description | Short description shown on the tutorial card hover. | Content | optional |
| Tags | tags | Comma-separated tags. Include topic and difficulty tags (e.g. audio, beginner, synthesis). | String | optional |
| Cover image | image | Cover image filename without File: prefix. | File | optional |
This template defines the table "Tutorials". View table.