From 8dcef2219404f833f3015bfa30f48f9e427ed924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 20 Jun 2024 15:26:06 +0200 Subject: [PATCH] Fix ToC for room versions pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Like for the cs-module shortcode, use .RenderShortcodes instead of .Content for the rver-fragment shortcode, so the headings are detected by Hugo. Signed-off-by: Kévin Commaille --- content/rooms/v3.md | 2 +- content/rooms/v8.md | 2 +- content/rooms/v9.md | 2 +- layouts/shortcodes/rver-fragment.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/rooms/v3.md b/content/rooms/v3.md index ad9ff698..3e1b9c89 100644 --- a/content/rooms/v3.md +++ b/content/rooms/v3.md @@ -102,7 +102,7 @@ the [Handling Redactions](#handling-redactions) section. {{% /boxes/note %}} -{{< rver-fragment name="v3-auth-rules" withVersioning=true >}} +{{% rver-fragment name="v3-auth-rules" withVersioning=true %}} ## Unchanged from v2 diff --git a/content/rooms/v8.md b/content/rooms/v8.md index ab4cd970..ccce921d 100644 --- a/content/rooms/v8.md +++ b/content/rooms/v8.md @@ -87,7 +87,7 @@ room without invite. Otherwise, the room version inherits all properties of points for handling `content.join_authorised_via_users_server` are added (Rule 4.2 and 4.3.5). -{{< rver-fragment name="v8-auth-rules" withVersioning=true >}} +{{% rver-fragment name="v8-auth-rules" withVersioning=true %}} ### Redactions diff --git a/content/rooms/v9.md b/content/rooms/v9.md index cef269c6..bfbcead4 100644 --- a/content/rooms/v9.md +++ b/content/rooms/v9.md @@ -83,7 +83,7 @@ completeness. ### Authorization rules -{{< rver-fragment name="v8-auth-rules" >}} +{{% rver-fragment name="v8-auth-rules" %}} ### State resolution diff --git a/layouts/shortcodes/rver-fragment.html b/layouts/shortcodes/rver-fragment.html index a10be8b5..894e6f0b 100644 --- a/layouts/shortcodes/rver-fragment.html +++ b/layouts/shortcodes/rver-fragment.html @@ -19,7 +19,7 @@ {{ with .Site.GetPage "rooms/fragments" }} {{ with .Resources.GetMatch (printf "%s%s" $name ".md") }} - {{ $content := .Content }} + {{ $content := .RenderShortcodes }} {{ if not $withVersioning }} {{ $content = (replace $content "[New in this version]" "") }} {{ $content = (replace $content "[Changed in this version]" "") }}