From 4ec72516929469e68233715d65cbe36124a982f1 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Mon, 6 Jul 2026 21:54:44 +0200 Subject: [PATCH] Transclude templates on Markdown pages by default Follows-up to https://github.com/ProfessionalWiki/NativeMarkdown/pull/16 Flip $wgNativeMarkdownTemplateTransclusion to true. $wgNativeMarkdownEverywhere already defaults to true, so out of the box every prose page is Markdown; with transclusion off, shared infoboxes, navboxes and citation templates render as literal {{...}} across the wiki. Turning it on completes the wiki integration with no cost to the AI story (action=raw still returns literal {{...}}) or to safety (parser output is sanitized as on any wikitext page). Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 7 +++---- extension.json | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c5be871..752d4f9 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ wikitext and Markdown (in both directions) via `Special:ChangeContentModel`. | `$wgNativeMarkdownEverywhere` | `false` | New pages everywhere default to Markdown, the "Markdown wiki" mode (see exclusions below) | | `$wgNativeMarkdownSuffixDetection` | `false` | New pages whose title ends in `.md` default to Markdown, in every namespace | | `$wgNativeMarkdownAllowExternalImages` | `false` | Embed external `![alt](url)` images; when off they render as plain links | -| `$wgNativeMarkdownTemplateTransclusion` | `false` | Expand `{{template}}` calls on Markdown pages; when off they stay literal text (see [Template transclusion](#template-transclusion)) | +| `$wgNativeMarkdownTemplateTransclusion` | `true` | Expand `{{template}}` calls on Markdown pages; set to `false` to leave them as literal text (see [Template transclusion](#template-transclusion)) | `$wgNativeMarkdownEverywhere` covers the whole prose wiki, but deliberately leaves some pages as wikitext: the discussion (Talk) namespaces, where signatures and threading depend on wikitext; the Template and MediaWiki @@ -104,9 +104,8 @@ by core's `$wgMaxArticleSize`. ## Template transclusion -By default `{{...}}` is literal text on a Markdown page. Set -`$wgNativeMarkdownTemplateTransclusion = true` to expand template calls instead, so Markdown pages can reuse a -wiki's shared infoboxes, citations and navboxes: +Markdown pages transclude a wiki's shared infoboxes, citations and navboxes with the usual `{{...}}` syntax. Set +`$wgNativeMarkdownTemplateTransclusion = false` to turn this off and leave `{{...}}` as literal text. ```markdown {{Infobox person diff --git a/extension.json b/extension.json index 76b8996..8023823 100644 --- a/extension.json +++ b/extension.json @@ -58,8 +58,8 @@ "value": false }, "NativeMarkdownTemplateTransclusion": { - "description": "If MediaWiki template calls ({{...}}) on markdown pages should be transcluded. When false (default), they are literal text. Enabling this also enables parser functions and magic words inside the braces, as expansion delegates to the MediaWiki parser.", - "value": false + "description": "If MediaWiki template calls ({{...}}) on markdown pages should be transcluded (default). When false, they are literal text. Transclusion also enables parser functions and magic words inside the braces, as expansion delegates to the MediaWiki parser.", + "value": true } },