Fix the table of content for room versions (#1884)

* Fix ToC for room versions pages

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 <zecakeh@tedomum.fr>

* Change the way "this version" is detected in added-in and changed-in shortcodes

Now that we use .RenderShortcodes in the rver-fragment shortcode,
we cannot remove the output of these shortcodes dynamically
because they are replaced by a temporary placeholder due to Hugo's internals.

Instead, since the `this` parameter was only used for room version,
we always use the `v` parameter and compare with the version
provided in the page's front matter.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Add version front matter for v11

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Update changelogs/room_versions/newsfragments/1884.clarification

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Co-authored-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Kévin Commaille 2024-06-20 17:47:09 +02:00 committed by GitHub
parent 18628dc5d7
commit 3af77f0cb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 60 additions and 51 deletions

View file

@ -2,6 +2,7 @@
title: Room Version 3
type: docs
weight: 30
version: 3
---
This room version builds on [version 2](/rooms/v2) with an improved event
@ -39,8 +40,7 @@ all the remaining behaviour described by [room version 2](/rooms/v2).
### Handling redactions
<!-- set withVersioning=true so we get all the "new in this version" stuff -->
{{% rver-fragment name="v3-handling-redactions" withVersioning=true %}}
{{% rver-fragment name="v3-handling-redactions" %}}
### Event IDs
@ -54,7 +54,7 @@ the use of a dedicated event ID, servers are required to track the
hashes on an event to determine its ID.
{{% /boxes/rationale %}}
{{% added-in this=true %}} The event ID is the [reference
{{% added-in v=3 %}} The event ID is the [reference
hash](/server-server-api#calculating-the-reference-hash-for-an-event) of
the event encoded using [Unpadded
Base64](/appendices#unpadded-base64), prefixed with `$`. A
@ -90,7 +90,7 @@ The complete structure of a event in a v3 room is shown below.
### Authorization rules
{{% boxes/note %}}
{{< added-in this=true >}} `m.room.redaction` events are subject to auth rules in
{{< added-in v=3 >}} `m.room.redaction` events are subject to auth rules in
the same way as any other event. In practice, that means they will normally be allowed
by the auth rules, unless the `m.room.power_levels` event sets a power level requirement
for `m.room.redaction`events via the `events` or `events_default` properties. In
@ -101,8 +101,7 @@ be performed. Receiving servers must perform additional checks, as described in
the [Handling Redactions](#handling-redactions) section.
{{% /boxes/note %}}
<!-- set withVersioning=true so we get all the "new in this version" stuff -->
{{< rver-fragment name="v3-auth-rules" withVersioning=true >}}
{{% rver-fragment name="v3-auth-rules" %}}
## Unchanged from v2