mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-27 21:44:10 +01:00
Turn room version fragments and cs modules into headless resources
This is actually doing two things:
* creating `{fragments,modules}/index.md` turns the fragments and modules into
page resources, rather than pages in their own right. We have to update the
shortcodes to match.
* adding `headless: true` means that we don't render the pages.
The net effect is that we don't render pages like
https://spec.matrix.org/v1.4/rooms/fragments/v1-auth-rules/ and
https://spec.matrix.org/v1.4/client-server-api/modules/account_data/.
This commit is contained in:
parent
830f80f56a
commit
56b75c809e
1
changelogs/internal/newsfragments/1317.clarification
Normal file
1
changelogs/internal/newsfragments/1317.clarification
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Stop rendering the subsections of the Client-Server API and Room Versions specs as their own separate pages.
|
||||||
3
content/client-server-api/modules/index.md
Normal file
3
content/client-server-api/modules/index.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
headless: true
|
||||||
|
---
|
||||||
3
content/rooms/fragments/index.md
Normal file
3
content/rooms/fragments/index.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
headless: true
|
||||||
|
---
|
||||||
|
|
@ -9,5 +9,8 @@
|
||||||
|
|
||||||
{{ $name := .Params.name }}
|
{{ $name := .Params.name }}
|
||||||
|
|
||||||
{{ $page := .Site.GetPage (path.Join .Page.File.Dir "modules" (printf "%s%s" $name ".md"))}}
|
{{ with .Site.GetPage "client-server-api/modules" }}
|
||||||
{{ $page.Content }}
|
{{ with .Resources.GetMatch (printf "%s%s" $name ".md") }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,13 @@
|
||||||
{{ $name := .Params.name }}
|
{{ $name := .Params.name }}
|
||||||
{{ $withVersioning := .Params.withVersioning }}
|
{{ $withVersioning := .Params.withVersioning }}
|
||||||
|
|
||||||
{{ $page := .Site.GetPage (path.Join .Page.File.Dir "fragments" (printf "%s%s" $name ".md"))}}
|
{{ with .Site.GetPage "rooms/fragments" }}
|
||||||
{{ $content := $page.Content }}
|
{{ with .Resources.GetMatch (printf "%s%s" $name ".md") }}
|
||||||
{{ if not $withVersioning }}
|
{{ $content := .Content }}
|
||||||
{{ $content = (replace $content "[New in this version]" "") }}
|
{{ if not $withVersioning }}
|
||||||
{{ $content = (replace $content "[Changed in this version]" "") }}
|
{{ $content = (replace $content "[New in this version]" "") }}
|
||||||
|
{{ $content = (replace $content "[Changed in this version]" "") }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $content | safeHTML }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $content | safeHTML }}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue