Compare commits

...

7 commits

Author SHA1 Message Date
Kévin Commaille f7bcb6d148
Merge a9a22697b1 into 67a2aa4761 2025-08-06 17:21:11 +01:00
Richard van der Hoff 67a2aa4761
Specify a correct spelling for "display name" (#2189)
Some checks are pending
Spec / 🔎 Validate OpenAPI specifications (push) Waiting to run
Spec / 🔎 Check Event schema examples (push) Waiting to run
Spec / 🔎 Check OpenAPI definitions examples (push) Waiting to run
Spec / 🔎 Check JSON Schemas inline examples (push) Waiting to run
Spec / ⚙️ Calculate baseURL for later jobs (push) Waiting to run
Spec / 🐍 Build OpenAPI definitions (push) Blocked by required conditions
Spec / 📢 Run towncrier for changelog (push) Waiting to run
Spec / 📖 Build the spec (push) Blocked by required conditions
Spec / 🔎 Validate generated HTML (push) Blocked by required conditions
Spec / 📖 Build the historical backup spec (push) Blocked by required conditions
Spell Check / Spell Check with Typos (push) Waiting to run
* Specify a correct spelling for "display name"

* RST uses double-backticks
2025-08-06 07:21:58 +01:00
Kévin Commaille a9a22697b1
Upgrade Hugo to latest version
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-24 11:01:34 +02:00
Kévin Commaille afa17d4d73
Point to correct docsy repo
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-24 10:49:29 +02:00
Kévin Commaille bb54e7d303
Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-06-09 10:47:43 +02:00
Kévin Commaille f7f641aae7
Move and update layouts
A big change for template paths landed in Hugo 0.146.0.

In `layouts`, we:

- remove `_default` and move everything in it directly under `layouts`
- rename `partials` and `shortcodes` to `_partials` and `_shortcodes`
- adapt to Hugo and docsy changes about the render-heading hook.
  We don't need a copy of the heading self-link template now that it is
  defined as a partial.
- update `docs/baseof.html` to match a change upstream
- split `docs/changelog.html` because it doesn't work for the section
  page anymore. We create a `changelog-index` layout for this.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-06-09 10:44:27 +02:00
Kévin Commaille e5b9214bee
Bump docsy and Hugo
Docsy 0.12.0 requires at least Hugo 0.146.0 because of changes to
template paths.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-06-09 10:44:27 +02:00
59 changed files with 56 additions and 56 deletions

View file

@ -1,7 +1,7 @@
name: "Spec" name: "Spec"
env: env:
HUGO_VERSION: 0.139.0 HUGO_VERSION: 0.148.1
PYTHON_VERSION: 3.13 PYTHON_VERSION: 3.13
on: on:

View file

@ -61,7 +61,7 @@ place after an MSC has been accepted, not as part of a proposal itself.
1. Install the extended version (often the OS default) of Hugo: 1. Install the extended version (often the OS default) of Hugo:
<https://gohugo.io/getting-started/installing>. Note that at least Hugo <https://gohugo.io/getting-started/installing>. Note that at least Hugo
v0.123.1 is required. v0.146.0 is required.
Alternatively, use the Docker image at Alternatively, use the Docker image at
https://hub.docker.com/r/klakegg/hugo/. (The "extended edition" is required https://hub.docker.com/r/klakegg/hugo/. (The "extended edition" is required

View file

@ -0,0 +1 @@
Upgrade the docsy theme to version 0.12.0.

View file

@ -0,0 +1 @@
Specify a correct spelling for "display name".

View file

@ -8,7 +8,7 @@ enableRobotsTXT = true
# We disable RSS, because (a) it's useless, (b) Hugo seems to generate broken # We disable RSS, because (a) it's useless, (b) Hugo seems to generate broken
# links to it when used with a --baseURL (for example, https://spec.matrix.org/v1.4/ # links to it when used with a --baseURL (for example, https://spec.matrix.org/v1.4/
# contains `<link rel="alternate" type="application/rss&#43;xml" href="/v1.4/v1.4/index.xml">`). # contains `<link rel="alternate" type="application/rss&#43;xml" href="/v1.4/v1.4/index.xml">`).
disableKinds = ["taxonomy", "RSS"] disableKinds = ["taxonomy", "rss"]
[languages] [languages]
[languages.en] [languages.en]
@ -134,7 +134,7 @@ sidebar_menu_compact = true
[module] [module]
[module.hugoVersion] [module.hugoVersion]
extended = true extended = true
min = "0.123.1" min = "0.146.0"
[[module.imports]] [[module.imports]]
path = "github.com/matrix-org/docsy" path = "github.com/matrix-org/docsy"
disable = false disable = false

View file

@ -1,6 +1,7 @@
--- ---
title: Changelog title: Changelog
type: docs type: docs
layout: changelog-index
weight: 1000 weight: 1000
--- ---

2
go.mod
View file

@ -2,4 +2,4 @@ module github.com/matrix-org/matrix-spec
go 1.12 go 1.12
require github.com/matrix-org/docsy v0.0.0-20241106102557-ec7b98ee4014 // indirect require github.com/matrix-org/docsy v0.0.0-20250722140156-5df72519f5af // indirect

8
go.sum
View file

@ -1,4 +1,4 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20240716171331-37eff7fa00de/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/matrix-org/docsy v0.0.0-20241106102557-ec7b98ee4014 h1:CNvxuuURuxkEjA0QN+lRKELc7PRDsX270e8v4GDF3II= github.com/matrix-org/docsy v0.0.0-20250722140156-5df72519f5af h1:XghgUC0H5BoGrvtT9/oWBUi+5Zux875qRHhpAZ0RURI=
github.com/matrix-org/docsy v0.0.0-20241106102557-ec7b98ee4014/go.mod h1:4Ek1bcdbfU/j8hIatEjNhIs1Yua85FtQf3kLvoYZ0bQ= github.com/matrix-org/docsy v0.0.0-20250722140156-5df72519f5af/go.mod h1:4/t21g/nPraob/DVMm3jrk26k0CDL5I7Mxf+ar0IAgs=
github.com/twbs/bootstrap v5.3.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=

View file

@ -1,11 +0,0 @@
{{- /*
A simplified copy of the inlined "_default/_markup/_td-heading-self-link.html"
template in Docsy's "_default/_markup/td-render-heading.html" template to be
able to reuse it when the heading has custom markup.
Takes a string which is the ID of the heading.
*/ -}}
<a class="td-heading-self-link" href="#{{ . | safeURL }}" aria-label="Heading self-link"></a>

View file

@ -8,4 +8,4 @@
heading. heading.
*/ -}} */ -}}
{{ template "_default/_markup/td-render-heading.html" . }} {{ partial "td/render-heading.html" . }}

View file

@ -24,7 +24,7 @@
<h1 id="{{ $anchor }}"> <h1 id="{{ $anchor }}">
{{ with .title }}{{ . | markdownify }}{{ else }}<code>{{ $event_name }}</code>{{ end }} {{ with .title }}{{ . | markdownify }}{{ else }}<code>{{ $event_name }}</code>{{ end }}
{{ template "_default/_markup/td-heading-self-link.html" $anchor }} {{ partial "td/heading-self-link.html" (dict "Anchor" $anchor) }}
</h1> </h1>
</summary> </summary>

View file

@ -66,7 +66,7 @@
* If the input `schema` was itself an object that we should create a table for, * If the input `schema` was itself an object that we should create a table for,
* this will be the same as the first entry in `objects`. * this will be the same as the first entry in `objects`.
*/ */
{{ define "partials/resolve-additional-types-inner" }} {{ define "_partials/resolve-additional-types-inner" }}
{{ $this_object := .schema }} {{ $this_object := .schema }}
{{ $anchor_base := .anchor_base }} {{ $anchor_base := .anchor_base }}
{{ $name := .name }} {{ $name := .name }}
@ -222,7 +222,7 @@
* * `objects`: The array of object schema definitions. * * `objects`: The array of object schema definitions.
* * `schema`: An updated copy of the `schema` input (eg, an `anchor` may be added). * * `schema`: An updated copy of the `schema` input (eg, an `anchor` may be added).
*/ */
{{ define "partials/get-additional-objects" }} {{ define "_partials/get-additional-objects" }}
/* .name is the name of the object for logging purposes */ /* .name is the name of the object for logging purposes */
{{ $name := .name }} {{ $name := .name }}
@ -246,6 +246,6 @@
* This is needed for uniqify to work - otherwise objects that are the same * This is needed for uniqify to work - otherwise objects that are the same
* but with (for example) different examples will be considered different. * but with (for example) different examples will be considered different.
*/ */
{{ define "partials/clean-object" }} {{ define "_partials/clean-object" }}
{{ return (dict "title" .title "properties" .properties "additionalProperties" .additionalProperties "patternProperties" .patternProperties "required" .required "enum" .enum "anchor" .anchor) }} {{ return (dict "title" .title "properties" .properties "additionalProperties" .additionalProperties "patternProperties" .patternProperties "required" .required "enum" .enum "anchor" .anchor) }}
{{ end }} {{ end }}

View file

@ -80,7 +80,7 @@
</div> </div>
</nav> </nav>
{{ define "partials/version-string" }} {{ define "_partials/version-string" }}
{{ $ret := "unstable version"}} {{ $ret := "unstable version"}}
{{ $status := .Site.Params.version.status }} {{ $status := .Site.Params.version.status }}

View file

@ -47,8 +47,8 @@
<tr> <tr>
<td><code>{{ $property_name }}</code></td> <td><code>{{ $property_name }}</code></td>
<td><code>{{ partial "partials/property-type" $property | safeHTML }}</code></td> <td><code>{{ partial "property-type" $property | safeHTML }}</code></td>
<td>{{ partial "partials/property-description" (dict "property" $property "required" $required) }}</td> <td>{{ partial "property-description" (dict "property" $property "required" $required) }}</td>
</tr> </tr>
{{ end }} {{ end }}
@ -71,8 +71,8 @@
<tr> <tr>
<td>&lt;Other properties&gt;</td> <td>&lt;Other properties&gt;</td>
<td><code>{{ partial "partials/property-type" .additionalProperties | safeHTML }}</code></td> <td><code>{{ partial "property-type" .additionalProperties | safeHTML }}</code></td>
<td>{{ partial "partials/property-description" (dict "property" .additionalProperties) }}</td> <td>{{ partial "property-description" (dict "property" .additionalProperties) }}</td>
</tr> </tr>
{{ end }} {{ end }}
</table> </table>
@ -101,8 +101,8 @@ resolve-additional-types.)
{{ $property := . }} {{ $property := . }}
<tr> <tr>
<td><code>{{ partial "partials/property-type" $property | safeHTML }}</code></td> <td><code>{{ partial "property-type" $property | safeHTML }}</code></td>
<td>{{ partial "partials/property-description" (dict "property" $property) }}</td> <td>{{ partial "property-description" (dict "property" $property) }}</td>
</tr> </tr>
</table> </table>
@ -138,7 +138,7 @@ resolve-additional-types.)
* `format`: optional string for the format of the type, used for strings. * `format`: optional string for the format of the type, used for strings.
*/}} */}}
{{ define "partials/property-type" }} {{ define "_partials/property-type" }}
{{ $type := "" }} {{ $type := "" }}
{{ if eq .type "object" }} {{ if eq .type "object" }}
@ -215,7 +215,7 @@ resolve-additional-types.)
* `anchor`: optional HTML element id for the target type, which will be used to link to it. * `anchor`: optional HTML element id for the target type, which will be used to link to it.
*/}} */}}
{{ define "partials/object-type-or-title" }} {{ define "_partials/object-type-or-title" }}
{{ $type := "object" }} {{ $type := "object" }}
{{ if .properties }} {{ if .properties }}
{{/* {{/*
@ -306,7 +306,7 @@ resolve-additional-types.)
* `x-changedInMatrixVersion`: optional string indicating in which Matrix * `x-changedInMatrixVersion`: optional string indicating in which Matrix
spec version this property was last changed. spec version this property was last changed.
*/}} */}}
{{ define "partials/property-description" -}} {{ define "_partials/property-description" -}}
{{ $description := .property.description -}} {{ $description := .property.description -}}
{{ if .required -}} {{ if .required -}}
{{/* {{/*
@ -331,7 +331,7 @@ resolve-additional-types.)
Computes the type to display for a string format, given the identifier of Computes the type to display for a string format, given the identifier of
the format as a string. the format as a string.
*/}} */}}
{{ define "partials/string-format" }} {{ define "_partials/string-format" }}
{{ $stringFormat := "" }} {{ $stringFormat := "" }}
{{ with index site.Data "string-formats" . }} {{ with index site.Data "string-formats" . }}

View file

@ -37,7 +37,7 @@
<h1 id="{{ $anchor }}"> <h1 id="{{ $anchor }}">
<span class="http-api-method">{{ $method }}</span> <span class="http-api-method">{{ $method }}</span>
<span class="endpoint{{ if $operation_data.deprecated }} deprecated-inline{{ end }}">{{ $endpoint }}</span> <span class="endpoint{{ if $operation_data.deprecated }} deprecated-inline{{ end }}">{{ $endpoint }}</span>
{{ template "_default/_markup/td-heading-self-link.html" $anchor }} {{ partial "td/heading-self-link.html" (dict "Anchor" $anchor) }}
</h1> </h1>
</summary> </summary>

View file

@ -25,7 +25,9 @@
</aside> </aside>
<main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main"> <main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
{{ partial "version-banner.html" . }} {{ partial "version-banner.html" . }}
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} {{ if not (.Param "ui.breadcrumb_disable") -}}
{{ partial "breadcrumb.html" . -}}
{{ end -}}
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</main> </main>
</div> </div>

View file

@ -0,0 +1,13 @@
{{- /*
Template to the `changelog` section page.
This redirects the page to the latest version's changelog page.
*/ -}}
{{ define "main" }}
{{ with index .RegularPages.ByDate.Reverse 0 -}}
<meta http-equiv="refresh" content="0; url={{ .RelPermalink }}">
{{ end -}}
{{ end }}

View file

@ -1,14 +1,8 @@
{{- /* {{- /*
Template to render a page with a `changelog` layout or the `changelog` Template to render a page with a `changelog` layout.
section page. This conflation seems to be a limitation of Hugo currently, it
uses this template for both cases.
For the `changelog` section page, this redirects the page to the latest This adds a table at the top of the page with information about the release:
version's changelog page.
For a page with a `changelog` layout, this adds a table at the top of the
page with information about the release:
* A link to the matrix-spec repository at the time of the release, with the * A link to the matrix-spec repository at the time of the release, with the
version taken from the `linkTitle` in the frontmatter of the page, unless version taken from the `linkTitle` in the frontmatter of the page, unless
@ -21,11 +15,6 @@
*/ -}} */ -}}
{{ define "main" }} {{ define "main" }}
{{ if .IsSection -}}
{{ with index .RegularPages.ByDate.Reverse 0 -}}
<meta http-equiv="refresh" content="0; url={{ .RelPermalink }}">
{{ end -}}
{{ else -}}
{{ $version := lower .LinkTitle -}} {{ $version := lower .LinkTitle -}}
<div class="td-content"> <div class="td-content">
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
@ -50,5 +39,4 @@
{{ .Content }} {{ .Content }}
</div> </div>
{{ end -}}
{{ end }} {{ end }}

View file

@ -60,6 +60,11 @@ General
you have at home. "identity server" is clear, whereas "identityserver" is you have at home. "identity server" is clear, whereas "identityserver" is
horrible. horrible.
* When talking about a user's "display name", it is spelt as two words. In
identifiers such as within the content of an ``m.room.member`` event, it is
spelt as a single word, ``displayname``. (There are some historical exceptions
to this where the identifier is spelt ``display_name``.)
* Lists should: * Lists should:
* Be introduced with a colon. * Be introduced with a colon.
@ -84,12 +89,12 @@ Changes between spec versions
Sections should reference the Matrix spec version they were added/changed in. This Sections should reference the Matrix spec version they were added/changed in. This
is often a guess at what the next version will be - please use the currently released is often a guess at what the next version will be - please use the currently released
version with a minor version bump as the referenced version. For example, if the version with a minor version bump as the referenced version. For example, if the
current version is `v1.1` then annotate your changes with `v1.2`. current version is ``v1.1`` then annotate your changes with ``v1.2``.
"Added/changed in" tags can be documented as the following: "Added/changed in" tags can be documented as the following:
* `{{% added-in v="1.2" %}}` or `{{% changed-in v="1.2" %}}` within Markdown documents. * ``{{% added-in v="1.2" %}}`` or ``{{% changed-in v="1.2" %}}`` within Markdown documents.
* `x-addedInMatrixVersion` and `x-changedInMatrixVersion` within OpenAPI. * ``x-addedInMatrixVersion`` and ``x-changedInMatrixVersion`` within OpenAPI.
OpenAPI OpenAPI
~~~~~~~ ~~~~~~~
@ -185,4 +190,4 @@ Describing grammar
Use `RFC5234-style ABNF <https://datatracker.ietf.org/doc/html/rfc5234>`_ when describing Use `RFC5234-style ABNF <https://datatracker.ietf.org/doc/html/rfc5234>`_ when describing
the grammar for something in the spec, such as user IDs or server names. Use lowercase the grammar for something in the spec, such as user IDs or server names. Use lowercase
and underscore-delimited element names (`user_id`, not `UserID` or `user-id`). and underscore-delimited element names (``user_id``, not ``UserID`` or ``user-id``).