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 7
type: docs
weight: 70
version: 7
---
This room version builds on [version 6](/rooms/v6) to introduce knocking
@ -32,7 +33,7 @@ as do the versions v6 is based upon.
### Authorization rules
{{< added-in this=true >}} For checks performed upon `m.room.member` events, a
{{< added-in v=7 >}} For checks performed upon `m.room.member` events, a
new point for `membership=knock` is added.
Events must be signed by the server denoted by the `sender` property.
@ -89,7 +90,7 @@ The rules are as follows:
`state_key` is the creator, allow.
2. If the `sender` does not match `state_key`, reject.
3. If the `sender` is banned, reject.
4. {{< changed-in this=true >}}
4. {{< changed-in v=7 >}}
If the `join_rule` is `invite` or `knock` then allow if
membership state is `invite` or `join`.
5. If the `join_rule` is `public`, allow.
@ -121,7 +122,7 @@ The rules are as follows:
the *invite level*, allow.
5. Otherwise, reject.
4. If `membership` is `leave`:
1. {{< changed-in this=true >}}
1. {{< changed-in v=7 >}}
If the `sender` matches `state_key`, allow if and only if
that user's current membership state is `invite`, `join`,
or `knock`.
@ -141,7 +142,7 @@ The rules are as follows:
the *ban level*, and the *target user*'s power level is less
than the `sender`'s power level, allow.
3. Otherwise, reject.
6. {{< added-in this=true >}}
6. {{< added-in v=7 >}}
If `membership` is `knock`:
1. If the `join_rule` is anything other than `knock`, reject.
2. If `sender` does not match `state_key`, reject.