From bf8dee74eb92bb37a59c3e61e86f19fee2e78cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:11:34 +0100 Subject: [PATCH] Fix relative URLs when serving the specification with a custom `baseURL` (#1984) --- .github/workflows/main.yml | 10 +++++-- {static => assets}/css/fonts/Inter.css | 0 {static => assets}/css/fonts/README.md | 2 +- .../css/fonts/download_google_fonts_css.py | 0 {static => assets}/css/fonts/requirements.txt | 0 {static => assets}/diagrams/README.md | 0 {static => assets}/diagrams/membership.drawio | 0 {static => assets}/diagrams/membership.png | Bin .../diagrams/threaded-dag-threads.drawio | 0 .../diagrams/threaded-dag-threads.png | Bin .../diagrams/threaded-dag.drawio | 0 {static => assets}/diagrams/threaded-dag.png | Bin {static => assets}/js/toc.js | 0 changelogs/header.md | 2 +- .../internal/newsfragments/1984.clarification | 1 + config.toml | 5 ---- content/changelog/v1.1.md | 2 +- content/changelog/v1.10.md | 2 +- content/changelog/v1.11.md | 2 +- content/changelog/v1.12.md | 2 +- content/changelog/v1.2.md | 2 +- content/changelog/v1.3.md | 2 +- content/changelog/v1.4.md | 2 +- content/changelog/v1.5.md | 2 +- content/changelog/v1.6.md | 2 +- content/changelog/v1.7.md | 2 +- content/changelog/v1.8.md | 2 +- content/changelog/v1.9.md | 2 +- data/api/client-server/account-data.yaml | 4 +-- data/api/client-server/appservice_ping.yaml | 4 +-- .../client-server/definitions/auth_data.yaml | 2 +- .../definitions/key_backup_session_data.yaml | 3 +- .../megolm_export_session_data.yaml | 4 +-- .../definitions/timeline_batch.yaml | 2 +- data/api/client-server/old_sync.yaml | 4 +-- .../room_event_by_timestamp.yaml | 2 +- data/api/client-server/room_initial_sync.yaml | 4 +-- data/api/client-server/space_hierarchy.yaml | 12 ++++---- data/api/client-server/sync.yaml | 27 ++++++++++-------- data/api/client-server/whoami.yaml | 6 ++-- data/api/server-server/events.yaml | 4 +-- data/api/server-server/joins-v1.yaml | 2 +- data/api/server-server/space_hierarchy.yaml | 4 +-- .../schema/m.forwarded_room_key.yaml | 2 +- .../schema/m.key.verification.request.yaml | 3 +- data/event-schemas/schema/m.room.create.yaml | 3 +- .../schema/m.room.encrypted.yaml | 11 +++---- data/event-schemas/schema/m.room.member.yaml | 2 +- ...om.message$m.key.verification.request.yaml | 2 +- data/event-schemas/schema/m.room_key.yaml | 2 +- .../schema/m.room_key_request.yaml | 4 +-- data/event-schemas/schema/m.secret.send.yaml | 3 +- data/event-schemas/schema/m.space.child.yaml | 2 +- data/string-formats.yaml | 10 +++---- go.mod | 2 +- go.sum | 4 +-- layouts/404.html | 2 +- layouts/partials/alert.html | 2 +- layouts/partials/hooks/body-end.html | 4 +-- layouts/partials/hooks/head-end.html | 5 ++-- .../partials/openapi/render-object-table.html | 2 +- 61 files changed, 101 insertions(+), 92 deletions(-) rename {static => assets}/css/fonts/Inter.css (100%) rename {static => assets}/css/fonts/README.md (97%) rename {static => assets}/css/fonts/download_google_fonts_css.py (100%) rename {static => assets}/css/fonts/requirements.txt (100%) rename {static => assets}/diagrams/README.md (100%) rename {static => assets}/diagrams/membership.drawio (100%) rename {static => assets}/diagrams/membership.png (100%) rename {static => assets}/diagrams/threaded-dag-threads.drawio (100%) rename {static => assets}/diagrams/threaded-dag-threads.png (100%) rename {static => assets}/diagrams/threaded-dag.drawio (100%) rename {static => assets}/diagrams/threaded-dag.png (100%) rename {static => assets}/js/toc.js (100%) create mode 100644 changelogs/internal/newsfragments/1984.clarification diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8db6359f..d67cd441 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,9 @@ name: "Spec" + +env: + # Cannot build the spec with Hugo 0.125.0 and docsy < 0.10.0 because of https://github.com/google/docsy/issues/1930 + HUGO_VERSION: 0.124.1 + on: push: branches: @@ -193,7 +198,7 @@ jobs: - name: "➕ Setup Hugo" uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0 with: - hugo-version: '0.117.0' + hugo-version: ${{ env.HUGO_VERSION }} extended: true - name: "📥 Source checkout" uses: actions/checkout@v4 @@ -270,8 +275,7 @@ jobs: - name: "➕ Setup Hugo" uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0 with: - # Cannot build the spec with Hugo 0.125.0 because of https://github.com/google/docsy/issues/1930 - hugo-version: '0.124.1' + hugo-version: ${{ env.HUGO_VERSION }} extended: true - name: "📥 Source checkout" uses: actions/checkout@v4 diff --git a/static/css/fonts/Inter.css b/assets/css/fonts/Inter.css similarity index 100% rename from static/css/fonts/Inter.css rename to assets/css/fonts/Inter.css diff --git a/static/css/fonts/README.md b/assets/css/fonts/README.md similarity index 97% rename from static/css/fonts/README.md rename to assets/css/fonts/README.md index aca33304..8c939e26 100644 --- a/static/css/fonts/README.md +++ b/assets/css/fonts/README.md @@ -16,7 +16,7 @@ load them. Example call: ```sh python3 download_google_fonts_css.py \ "https://fonts.googleapis.com/css?family=Inter:300,300i,400,400i,700,700i" \ - ../../fonts \ + ../../../static/fonts \ ../../fonts ``` diff --git a/static/css/fonts/download_google_fonts_css.py b/assets/css/fonts/download_google_fonts_css.py similarity index 100% rename from static/css/fonts/download_google_fonts_css.py rename to assets/css/fonts/download_google_fonts_css.py diff --git a/static/css/fonts/requirements.txt b/assets/css/fonts/requirements.txt similarity index 100% rename from static/css/fonts/requirements.txt rename to assets/css/fonts/requirements.txt diff --git a/static/diagrams/README.md b/assets/diagrams/README.md similarity index 100% rename from static/diagrams/README.md rename to assets/diagrams/README.md diff --git a/static/diagrams/membership.drawio b/assets/diagrams/membership.drawio similarity index 100% rename from static/diagrams/membership.drawio rename to assets/diagrams/membership.drawio diff --git a/static/diagrams/membership.png b/assets/diagrams/membership.png similarity index 100% rename from static/diagrams/membership.png rename to assets/diagrams/membership.png diff --git a/static/diagrams/threaded-dag-threads.drawio b/assets/diagrams/threaded-dag-threads.drawio similarity index 100% rename from static/diagrams/threaded-dag-threads.drawio rename to assets/diagrams/threaded-dag-threads.drawio diff --git a/static/diagrams/threaded-dag-threads.png b/assets/diagrams/threaded-dag-threads.png similarity index 100% rename from static/diagrams/threaded-dag-threads.png rename to assets/diagrams/threaded-dag-threads.png diff --git a/static/diagrams/threaded-dag.drawio b/assets/diagrams/threaded-dag.drawio similarity index 100% rename from static/diagrams/threaded-dag.drawio rename to assets/diagrams/threaded-dag.drawio diff --git a/static/diagrams/threaded-dag.png b/assets/diagrams/threaded-dag.png similarity index 100% rename from static/diagrams/threaded-dag.png rename to assets/diagrams/threaded-dag.png diff --git a/static/js/toc.js b/assets/js/toc.js similarity index 100% rename from static/js/toc.js rename to assets/js/toc.js diff --git a/changelogs/header.md b/changelogs/header.md index a8fd04ba..21f3b4d2 100644 --- a/changelogs/header.md +++ b/changelogs/header.md @@ -9,7 +9,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/VERSION
Release dateDATE
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/changelogs/internal/newsfragments/1984.clarification b/changelogs/internal/newsfragments/1984.clarification new file mode 100644 index 00000000..cb11abe6 --- /dev/null +++ b/changelogs/internal/newsfragments/1984.clarification @@ -0,0 +1 @@ +Fix relative URLs when serving the specification with a custom `baseURL`. diff --git a/config.toml b/config.toml index 06c11ad6..2494ad1e 100644 --- a/config.toml +++ b/config.toml @@ -1,10 +1,6 @@ baseURL = "/" title = "Matrix Specification" -# Prepends absolute URLs with the baseURL. Useful when hosting on non-root -# paths, such as /unstable. -canonifyURLs = true - enableRobotsTXT = true # We disable RSS, because (a) it's useless, (b) Hugo seems to generate broken @@ -146,4 +142,3 @@ sidebar_menu_compact = true mediaType = "text/markdown" isPlainText = true baseName = "checklist" - notAlternative = true diff --git a/content/changelog/v1.1.md b/content/changelog/v1.1.md index 91a79581..7e31122d 100644 --- a/content/changelog/v1.1.md +++ b/content/changelog/v1.1.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-doc/tree/v1.1
Release dateNovember 09, 2021
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.10.md b/content/changelog/v1.10.md index 38fb0501..8a0e496d 100644 --- a/content/changelog/v1.10.md +++ b/content/changelog/v1.10.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.10
Release dateMarch 22, 2024
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.11.md b/content/changelog/v1.11.md index cb20f57b..d38d874b 100644 --- a/content/changelog/v1.11.md +++ b/content/changelog/v1.11.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.11
Release dateJune 20, 2024
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.12.md b/content/changelog/v1.12.md index 61c2cc80..8124ca28 100644 --- a/content/changelog/v1.12.md +++ b/content/changelog/v1.12.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.12
Release dateOctober 07, 2024
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.2.md b/content/changelog/v1.2.md index 5f06e8a7..224da53f 100644 --- a/content/changelog/v1.2.md +++ b/content/changelog/v1.2.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-doc/tree/v1.2
Release dateFebruary 02, 2022
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.3.md b/content/changelog/v1.3.md index 46e7f0d4..b8c99a7c 100644 --- a/content/changelog/v1.3.md +++ b/content/changelog/v1.3.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.3
Release dateJune 15, 2022
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.4.md b/content/changelog/v1.4.md index 6515e570..10510d80 100644 --- a/content/changelog/v1.4.md +++ b/content/changelog/v1.4.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.4
Release dateSeptember 29, 2022
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.5.md b/content/changelog/v1.5.md index cc099ebe..9f23a019 100644 --- a/content/changelog/v1.5.md +++ b/content/changelog/v1.5.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.5
Release dateNovember 17, 2022
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.6.md b/content/changelog/v1.6.md index d0e14a0a..d47c36b5 100644 --- a/content/changelog/v1.6.md +++ b/content/changelog/v1.6.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.6
Release dateFebruary 14, 2023
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.7.md b/content/changelog/v1.7.md index 8cbe1985..f4b2b63e 100644 --- a/content/changelog/v1.7.md +++ b/content/changelog/v1.7.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.7
Release dateMay 25, 2023
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.8.md b/content/changelog/v1.8.md index 2ff0e7a4..1883d10a 100644 --- a/content/changelog/v1.8.md +++ b/content/changelog/v1.8.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.8
Release dateAugust 23, 2023
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/content/changelog/v1.9.md b/content/changelog/v1.9.md index 6679dd98..a3971bd2 100644 --- a/content/changelog/v1.9.md +++ b/content/changelog/v1.9.md @@ -18,7 +18,7 @@ Variables: - +
Git commithttps://github.com/matrix-org/matrix-spec/tree/v1.9
Release dateNovember 29, 2023
Checklistchecklist.md
Checklist}}">checklist.md
diff --git a/data/api/client-server/account-data.yaml b/data/api/client-server/account-data.yaml index 8fda4c39..fea15d95 100644 --- a/data/api/client-server/account-data.yaml +++ b/data/api/client-server/account-data.yaml @@ -23,7 +23,7 @@ paths: Set some account data for the client. This config is only visible to the user that set the account data. The config will be available to clients through the top-level `account_data` field in the homeserver response to - [/sync](#get_matrixclientv3sync). + [/sync](/client-server-api/#get_matrixclientv3sync). operationId: setAccountData security: - accessTokenQuery: [] @@ -185,7 +185,7 @@ paths: description: |- Set some account data for the client on a given room. This config is only visible to the user that set the account data. The config will be delivered to - clients in the per-room entries via [/sync](#get_matrixclientv3sync). + clients in the per-room entries via [/sync](/client-server-api/#get_matrixclientv3sync). operationId: setAccountDataPerRoom security: - accessTokenQuery: [] diff --git a/data/api/client-server/appservice_ping.yaml b/data/api/client-server/appservice_ping.yaml index 5596119e..ed84a089 100644 --- a/data/api/client-server/appservice_ping.yaml +++ b/data/api/client-server/appservice_ping.yaml @@ -23,7 +23,7 @@ paths: connection works. description: |- This API asks the homeserver to call the - [`/_matrix/app/v1/ping`](#post_matrixappv1ping) endpoint on the + [`/_matrix/app/v1/ping`](/application-service-api/#post_matrixappv1ping) endpoint on the application service to ensure that the homeserver can communicate with the application service. @@ -71,7 +71,7 @@ paths: type: integer description: |- The duration in milliseconds that the - [`/_matrix/app/v1/ping`](#post_matrixappv1ping) + [`/_matrix/app/v1/ping`](/application-service-api/#post_matrixappv1ping) request took from the homeserver's point of view. required: - duration_ms diff --git a/data/api/client-server/definitions/auth_data.yaml b/data/api/client-server/definitions/auth_data.yaml index 691cdc65..0186b24e 100644 --- a/data/api/client-server/definitions/auth_data.yaml +++ b/data/api/client-server/definitions/auth_data.yaml @@ -21,7 +21,7 @@ properties: The authentication type that the client is attempting to complete. May be omitted if `session` is given, and the client is reissuing a request which it believes has been completed out-of-band (for example, - via the [fallback mechanism](#fallback)). + via the [fallback mechanism](/client-server-api/#fallback)). type: string session: description: The value of the session key given by the homeserver. diff --git a/data/api/client-server/definitions/key_backup_session_data.yaml b/data/api/client-server/definitions/key_backup_session_data.yaml index bc61bb30..e2579142 100644 --- a/data/api/client-server/definitions/key_backup_session_data.yaml +++ b/data/api/client-server/definitions/key_backup_session_data.yaml @@ -28,7 +28,8 @@ properties: items: type: string description: |- - Chain of Curve25519 keys through which this session was forwarded, via [m.forwarded_room_key](#mforwarded_room_key) events. + Chain of Curve25519 keys through which this session was forwarded, via [m.forwarded_room_key](/client-server-api/#mforwarded_room_key) + events. sender_key: type: string description: |- diff --git a/data/api/client-server/definitions/megolm_export_session_data.yaml b/data/api/client-server/definitions/megolm_export_session_data.yaml index f5d1e409..ac4e4945 100644 --- a/data/api/client-server/definitions/megolm_export_session_data.yaml +++ b/data/api/client-server/definitions/megolm_export_session_data.yaml @@ -21,8 +21,8 @@ allOf: The format used to encode a Megolm session key for export. This is similar to the format before encryption used for the session keys - in [Server-side key backups](#server-side-key-backups) but adds the - `room_id` and `session_id` fields. + in [Server-side key backups](/client-server-api/#server-side-key-backups) + but adds the `room_id` and `session_id` fields. properties: room_id: type: string diff --git a/data/api/client-server/definitions/timeline_batch.yaml b/data/api/client-server/definitions/timeline_batch.yaml index 1c4ba40e..5b95f583 100644 --- a/data/api/client-server/definitions/timeline_batch.yaml +++ b/data/api/client-server/definitions/timeline_batch.yaml @@ -19,7 +19,7 @@ properties: type: boolean prev_batch: description: A token that can be supplied to the `from` parameter of the - [`/rooms//messages`](#get_matrixclientv3roomsroomidmessages) + [`/rooms//messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) endpoint in order to retrieve earlier events. If no earlier events are available, this property may be omitted from diff --git a/data/api/client-server/old_sync.yaml b/data/api/client-server/old_sync.yaml index a1d0f497..0a3c0439 100644 --- a/data/api/client-server/old_sync.yaml +++ b/data/api/client-server/old_sync.yaml @@ -173,7 +173,7 @@ paths: description: |- A token which correlates to the start of `chunk`. Can be passed to - [`/rooms//messages`](#get_matrixclientv3roomsroomidmessages) + [`/rooms//messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) to retrieve earlier events. If no earlier events are available, this property may be omitted from @@ -183,7 +183,7 @@ paths: description: |- A token which correlates to the end of `chunk`. Can be passed to - [`/rooms//messages`](#get_matrixclientv3roomsroomidmessages) + [`/rooms//messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) to retrieve later events. chunk: type: array diff --git a/data/api/client-server/room_event_by_timestamp.yaml b/data/api/client-server/room_event_by_timestamp.yaml index 232950f5..1ab52cb9 100644 --- a/data/api/client-server/room_event_by_timestamp.yaml +++ b/data/api/client-server/room_event_by_timestamp.yaml @@ -30,7 +30,7 @@ paths: to ask other servers for a suitable event. After calling this endpoint, clients can call - [`/rooms/{roomId}/context/{eventId}`](#get_matrixclientv3roomsroomidcontexteventid) + [`/rooms/{roomId}/context/{eventId}`](/client-server-api/#get_matrixclientv3roomsroomidcontexteventid) to obtain a pagination token to retrieve the events around the returned event. The event returned by this endpoint could be an event that the client diff --git a/data/api/client-server/room_initial_sync.yaml b/data/api/client-server/room_initial_sync.yaml index 6b34f331..7b70bacb 100644 --- a/data/api/client-server/room_initial_sync.yaml +++ b/data/api/client-server/room_initial_sync.yaml @@ -54,7 +54,7 @@ paths: type: string description: |- A token which correlates to the start of `chunk`. Can be passed to - [`/rooms//messages`](#get_matrixclientv3roomsroomidmessages) + [`/rooms//messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) to retrieve earlier events. If no earlier events are available, this property may be omitted from @@ -63,7 +63,7 @@ paths: type: string description: |- A token which correlates to the end of `chunk`. Can be passed to - [`/rooms//messages`](#get_matrixclientv3roomsroomidmessages) + [`/rooms//messages`](/client-server-api/#get_matrixclientv3roomsroomidmessages) to retrieve later events. chunk: type: array diff --git a/data/api/client-server/space_hierarchy.yaml b/data/api/client-server/space_hierarchy.yaml index 8378aee0..6329495c 100644 --- a/data/api/client-server/space_hierarchy.yaml +++ b/data/api/client-server/space_hierarchy.yaml @@ -26,8 +26,8 @@ paths: Where a child room is unknown to the local server, federation is used to fill in the details. The servers listed in the `via` array should be contacted to attempt to fill in missing rooms. - Only [`m.space.child`](#mspacechild) state events of the room are considered. Invalid child - rooms and parent events are not covered by this endpoint. + Only [`m.space.child`](/client-server-api/#mspacechild) state events of the room are considered. + Invalid child rooms and parent events are not covered by this endpoint. operationId: getSpaceHierarchy security: - accessTokenQuery: [] @@ -44,8 +44,8 @@ paths: name: suggested_only description: |- Optional (default `false`) flag to indicate whether or not the server should only consider - suggested rooms. Suggested rooms are annotated in their [`m.space.child`](#mspacechild) event - contents. + suggested rooms. Suggested rooms are annotated in their [`m.space.child`](/client-server-api/#mspacechild) + event contents. example: true schema: type: boolean @@ -103,8 +103,8 @@ paths: children_state: type: array description: |- - The [`m.space.child`](#mspacechild) events of the space-room, represented - as [Stripped State Events](#stripped-state) with an added `origin_server_ts` key. + The [`m.space.child`](/client-server-api/#mspacechild) events of the space-room, represented + as [Stripped State Events](/client-server-api/#stripped-state) with an added `origin_server_ts` key. If the room is not a space-room, this should be empty. items: diff --git a/data/api/client-server/sync.yaml b/data/api/client-server/sync.yaml index efe36c5c..1122f28f 100644 --- a/data/api/client-server/sync.yaml +++ b/data/api/client-server/sync.yaml @@ -223,8 +223,8 @@ paths: The new ephemeral events in the room (events that aren't recorded in the timeline or state of the room). In this version of the spec, these are - [typing notification](#typing-notifications) and - [read receipt](#receipts) events. + [typing notification](/client-server-api/#typing-notifications) + and [read receipt](/client-server-api/#receipts) events. allOf: - $ref: definitions/event_batch.yaml account_data: @@ -245,7 +245,7 @@ paths: If `unread_thread_notifications` was specified as `true` on the `RoomEventFilter`, these counts will only be for the main timeline rather than all events in the room. - See the [threading module](#threading) for more information. + See the [threading module](/client-server-api/#threading) for more information. x-changedInMatrixVersion: "1.4": | Updated to reflect behaviour of having `unread_thread_notifications` as `true` in @@ -265,8 +265,8 @@ paths: type: object description: |- If `unread_thread_notifications` was specified as `true` on the `RoomEventFilter`, - the notification counts for each [thread](#threading) in this room. The object is - keyed by thread root ID, with values matching `unread_notifications`. + the notification counts for each [thread](/client-server-api/#threading) in this room. + The object is keyed by thread root ID, with values matching `unread_notifications`. If a thread does not have any notifications it can be omitted from this object. If no threads have notification counts, this whole object can be omitted. @@ -302,12 +302,13 @@ paths: title: InviteState type: object description: |- - The [stripped state](#stripped-state) of a room that the user has been invited - to. + The [stripped state](/client-server-api/#stripped-state) of a room that the user has + been invited to. properties: events: - description: The [stripped state events](#stripped-state) that form the invite - state. + description: |- + The [stripped state events](/client-server-api/#stripped-state) that form the + invite state. items: $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml type: array @@ -325,12 +326,14 @@ paths: knock_state: title: KnockState type: object - description: The [stripped state](#stripped-state) of a room that the user has + description: |- + The [stripped state](/client-server-api/#stripped-state) of a room that the user has knocked upon. properties: events: - description: The [stripped state events](#stripped-state) that form the knock - state. + description: |- + The [stripped state events](/client-server-api/#stripped-state) that form the + knock state. items: $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml type: array diff --git a/data/api/client-server/whoami.yaml b/data/api/client-server/whoami.yaml index 390fa773..8f4027e7 100644 --- a/data/api/client-server/whoami.yaml +++ b/data/api/client-server/whoami.yaml @@ -57,9 +57,9 @@ paths: x-addedInMatrixVersion: "1.2" type: boolean description: |- - When `true`, the user is a [Guest User](#guest-access). When - not present or `false`, the user is presumed to be a non-guest - user. + When `true`, the user is a [Guest User](/client-server-api/#guest-access). + When not present or `false`, the user is presumed to be a + non-guest user. examples: response: value: { diff --git a/data/api/server-server/events.yaml b/data/api/server-server/events.yaml index 30e22830..f61f6fe4 100644 --- a/data/api/server-server/events.yaml +++ b/data/api/server-server/events.yaml @@ -216,8 +216,8 @@ paths: using the `origin_server_ts` property, whether the returned event is closer to the requested timestamp than the closest event that it could find locally. If so, it should try to backfill this event via the - [`/event/{event_id}`](#get_matrixfederationv1eventeventid) endpoint so - that it is available to for a client to query. + [`/event/{event_id}`](/server-server-api/#get_matrixfederationv1eventeventid) + endpoint so that it is available to for a client to query. operationId: getEventByTimestamp security: - accessToken: [] diff --git a/data/api/server-server/joins-v1.yaml b/data/api/server-server/joins-v1.yaml index a361836c..9247626a 100644 --- a/data/api/server-server/joins-v1.yaml +++ b/data/api/server-server/joins-v1.yaml @@ -155,7 +155,7 @@ paths: The request is invalid, the room the server is attempting to join has a version that is not listed in the `ver` parameters, or the server was unable to validate - [restricted room conditions](#restricted-rooms). + [restricted room conditions](/server-server-api/#restricted-rooms). The error should be passed through to clients so that they may give better feedback to users. diff --git a/data/api/server-server/space_hierarchy.yaml b/data/api/server-server/space_hierarchy.yaml index 1b9ba99c..8394588b 100644 --- a/data/api/server-server/space_hierarchy.yaml +++ b/data/api/server-server/space_hierarchy.yaml @@ -75,7 +75,7 @@ paths: items: type: string description: |- - If the room is a [restricted room](#restricted-rooms), these are the room IDs which + If the room is a [restricted room](/server-server-api/#restricted-rooms), these are the room IDs which are specified by the join rules. Empty or omitted otherwise. children_state: type: array @@ -119,7 +119,7 @@ paths: items: type: string description: |- - If the room is a [restricted room](#restricted-rooms), these are the room IDs which + If the room is a [restricted room](/server-server-api/#restricted-rooms), these are the room IDs which are specified by the join rules. Empty or omitted otherwise. inaccessible_children: type: array diff --git a/data/event-schemas/schema/m.forwarded_room_key.yaml b/data/event-schemas/schema/m.forwarded_room_key.yaml index 10b8b652..101716a0 100644 --- a/data/event-schemas/schema/m.forwarded_room_key.yaml +++ b/data/event-schemas/schema/m.forwarded_room_key.yaml @@ -4,7 +4,7 @@ allOf: description: |- This event type is used to forward keys for end-to-end encryption. - It is encrypted as an `m.room.encrypted` event using [Olm](#molmv1curve25519-aes-sha2), + It is encrypted as an `m.room.encrypted` event using [Olm](/client-server-api/#molmv1curve25519-aes-sha2), then sent as a [to-device](/client-server-api/#send-to-device-messaging) event. properties: content: diff --git a/data/event-schemas/schema/m.key.verification.request.yaml b/data/event-schemas/schema/m.key.verification.request.yaml index 76ba618d..880d4900 100644 --- a/data/event-schemas/schema/m.key.verification.request.yaml +++ b/data/event-schemas/schema/m.key.verification.request.yaml @@ -5,7 +5,8 @@ allOf: description: |- Requests a key verification using to-device messaging. When requesting a key verification in a room, a `m.room.message` should be used, with - [`m.key.verification.request`](#mroommessagemkeyverificationrequest) as msgtype. + [`m.key.verification.request`](/client-server-api/#mroommessagemkeyverificationrequest) + as msgtype. properties: content: properties: diff --git a/data/event-schemas/schema/m.room.create.yaml b/data/event-schemas/schema/m.room.create.yaml index 1ca37865..19b2bae4 100644 --- a/data/event-schemas/schema/m.room.create.yaml +++ b/data/event-schemas/schema/m.room.create.yaml @@ -18,7 +18,8 @@ properties: type: string type: description: |- - Optional [room type](#types) to denote a room's intended function outside of traditional conversation. + Optional [room type](/client-server-api/#types) to denote a room's intended function outside of traditional + conversation. Unspecified room types are possible using [Namespaced Identifiers](/appendices/#common-namespaced-identifier-grammar). type: string diff --git a/data/event-schemas/schema/m.room.encrypted.yaml b/data/event-schemas/schema/m.room.encrypted.yaml index f608a6e2..6a5689ac 100644 --- a/data/event-schemas/schema/m.room.encrypted.yaml +++ b/data/event-schemas/schema/m.room.encrypted.yaml @@ -46,14 +46,15 @@ properties: "1.3": |- Previously this field was required, however given it offers no additional security or privacy benefit it has been deprecated for Megolm messages. - See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) for more information. + See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) for + more information. description: |- The Curve25519 key of the sender. Required (not deprecated) if not using Megolm. **Deprecated**: This field provides no additional security or privacy benefit for Megolm messages and must not be read from if the encrypted event is using Megolm. It should still be included on outgoing messages, however must not be - used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) + used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) for more information. device_id: type: string @@ -62,15 +63,15 @@ properties: "1.3": |- Previously this field was required for Megolm messages, however given it offers no additional security or privacy benefit it has been deprecated - for Megolm messages. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) for - more information. + for Megolm messages. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) + for more information. description: |- The ID of the sending device. **Deprecated**: This field provides no additional security or privacy benefit for Megolm messages and must not be read from if the encrypted event is using Megolm. It should still be included on outgoing messages, however must not be - used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) + used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) for more information. session_id: type: string diff --git a/data/event-schemas/schema/m.room.member.yaml b/data/event-schemas/schema/m.room.member.yaml index f2d297b5..8d212687 100644 --- a/data/event-schemas/schema/m.room.member.yaml +++ b/data/event-schemas/schema/m.room.member.yaml @@ -64,7 +64,7 @@ properties: type: string description: |- Usually found on `join` events, this field is used to denote which homeserver (through representation of a user with sufficient power level) - authorised the user's join. More information about this field can be found in the [Restricted Rooms Specification](#restricted-rooms). + authorised the user's join. More information about this field can be found in the [Restricted Rooms Specification](/client-server-api/#restricted-rooms). Client and server implementations should be aware of the [signing implications](/rooms/v8/#authorization-rules) of including this field in further events: in particular, the event must be signed by the server which diff --git a/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml b/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml index c0a0764c..43882ab9 100644 --- a/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml +++ b/data/event-schemas/schema/m.room.message$m.key.verification.request.yaml @@ -3,7 +3,7 @@ allOf: - $ref: core-event-schema/room_event.yaml description: Requests a key verification in a room. When requesting a key verification - using to-device messaging, an event with type [`m.key.verification.request`](#mkeyverificationrequest) + using to-device messaging, an event with type [`m.key.verification.request`](/client-server-api/#mkeyverificationrequest) should be used. properties: content: diff --git a/data/event-schemas/schema/m.room_key.yaml b/data/event-schemas/schema/m.room_key.yaml index 34ceb9ae..c90b41b4 100644 --- a/data/event-schemas/schema/m.room_key.yaml +++ b/data/event-schemas/schema/m.room_key.yaml @@ -4,7 +4,7 @@ allOf: description: |- This event type is used to exchange keys for end-to-end encryption. - It is encrypted as an `m.room.encrypted` event using [Olm](#molmv1curve25519-aes-sha2), + It is encrypted as an `m.room.encrypted` event using [Olm](/client-server-api/#molmv1curve25519-aes-sha2), then sent as a [to-device](/client-server-api/#send-to-device-messaging) event. properties: content: diff --git a/data/event-schemas/schema/m.room_key_request.yaml b/data/event-schemas/schema/m.room_key_request.yaml index 9894456e..62b07a23 100644 --- a/data/event-schemas/schema/m.room_key_request.yaml +++ b/data/event-schemas/schema/m.room_key_request.yaml @@ -26,7 +26,7 @@ properties: x-changedInMatrixVersion: "1.3": |- Previously this field was required, however given it offers no additional - security or privacy benefit it has been deprecated. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) + security or privacy benefit it has been deprecated. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) for more information. description: |- The Curve25519 key of the device which initiated the session originally. @@ -34,7 +34,7 @@ properties: **Deprecated**: This field provides no additional security or privacy benefit and must not be read from. It should still be included on outgoing messages (if the event for which keys are being requested for *also* has a `sender_key`), - however must not be used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](#mmegolmv1aes-sha2) + however must not be used to find the corresponding session. See [`m.megolm.v1.aes-sha2`](/client-server-api/#mmegolmv1aes-sha2) for more information. session_id: type: string diff --git a/data/event-schemas/schema/m.secret.send.yaml b/data/event-schemas/schema/m.secret.send.yaml index ecf22183..a2cafb6d 100644 --- a/data/event-schemas/schema/m.secret.send.yaml +++ b/data/event-schemas/schema/m.secret.send.yaml @@ -4,7 +4,8 @@ allOf: description: |- Sent by a client to share a secret with another device, in response to an `m.secret.request` event. It must be encrypted as an `m.room.encrypted` event - using [Olm](#molmv1curve25519-aes-sha2), then sent as a to-device event. + using [Olm](/client-server-api/#molmv1curve25519-aes-sha2), then sent as a + to-device event. The `request_id` must match the ID previously given in an `m.secret.request` event. The recipient must ensure that this event comes from a device that the diff --git a/data/event-schemas/schema/m.space.child.yaml b/data/event-schemas/schema/m.space.child.yaml index c73d440f..2222b3a1 100644 --- a/data/event-schemas/schema/m.space.child.yaml +++ b/data/event-schemas/schema/m.space.child.yaml @@ -1,7 +1,7 @@ --- allOf: - $ref: core-event-schema/state_event.yaml -description: Defines the relationship of a child room to a space-room. Has no effect in rooms which are not [spaces](#spaces). +description: Defines the relationship of a child room to a space-room. Has no effect in rooms which are not [spaces](/client-server-api/#spaces). properties: content: properties: diff --git a/data/string-formats.yaml b/data/string-formats.yaml index 4ffe219c..352d21fc 100644 --- a/data/string-formats.yaml +++ b/data/string-formats.yaml @@ -38,27 +38,27 @@ mx-user-id: title: User ID - url: /appendices#user-identifiers + url: appendices#user-identifiers # regex: "^@" mx-event-id: title: Event ID - url: /appendices#event-ids + url: appendices#event-ids # regex: "^\\$" mx-room-id: title: Room ID - url: /appendices#room-ids + url: appendices#room-ids # regex: "^!" mx-server-name: title: Server Name - url: /appendices#server-name + url: appendices#server-name # no regex mx-mxc-uri: title: Matrix Content URI - url: /client-server-api#matrix-content-mxc-uris + url: client-server-api#matrix-content-mxc-uris # regex: "^mxc:\\/\\/" uri: diff --git a/go.mod b/go.mod index 7988b29f..d17af303 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/matrix-org/matrix-spec go 1.12 -require github.com/matrix-org/docsy v0.0.0-20231227121313-d55dbaf3aaaf // indirect +require github.com/matrix-org/docsy v0.0.0-20241030165433-a14705b7e3ca // indirect diff --git a/go.sum b/go.sum index 1fb47ebd..d76f3534 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= -github.com/matrix-org/docsy v0.0.0-20231227121313-d55dbaf3aaaf h1:e1mutHvMYJ92F/VkAp2ixQthXf6zNHJll4wYGbBHznI= -github.com/matrix-org/docsy v0.0.0-20231227121313-d55dbaf3aaaf/go.mod h1:TAN2cSMJzy0hnx9OYDbBYluS8raV61UHxT/tfjaLt3g= +github.com/matrix-org/docsy v0.0.0-20241030165433-a14705b7e3ca h1:WqKYQIF3JdWxY6b+OZQbdCjczOmELuUxpXhXSXJ/F58= +github.com/matrix-org/docsy v0.0.0-20241030165433-a14705b7e3ca/go.mod h1:TAN2cSMJzy0hnx9OYDbBYluS8raV61UHxT/tfjaLt3g= github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/layouts/404.html b/layouts/404.html index 212e20ba..c8a3523b 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,7 +2,7 @@

Not found

-

This page doesn't exist. Try going back to the main page for the Matrix Specification.

+

This page doesn't exist. Try going back to the main page for the Matrix Specification.

{{ end }} diff --git a/layouts/partials/alert.html b/layouts/partials/alert.html index 9096769f..91dd6799 100644 --- a/layouts/partials/alert.html +++ b/layouts/partials/alert.html @@ -16,5 +16,5 @@ {{ $omit_title := .omit_title }} diff --git a/layouts/partials/hooks/body-end.html b/layouts/partials/hooks/body-end.html index f975eddf..1e7c7d66 100644 --- a/layouts/partials/hooks/body-end.html +++ b/layouts/partials/hooks/body-end.html @@ -6,5 +6,5 @@ the place we are at in the document. */}} - - +{{ $toc := resources.Get "js/toc.js" -}} + diff --git a/layouts/partials/hooks/head-end.html b/layouts/partials/hooks/head-end.html index 9ce7e3e5..2284701b 100644 --- a/layouts/partials/hooks/head-end.html +++ b/layouts/partials/hooks/head-end.html @@ -13,5 +13,6 @@ Google Fonts manually via a script: https://github.com/matrix-org/matrix-spec/tree/main/static/css/fonts */}} - - +{{ $inter := resources.Get "css/fonts/Inter.css" -}} + + diff --git a/layouts/partials/openapi/render-object-table.html b/layouts/partials/openapi/render-object-table.html index c757140f..bae7a3d9 100644 --- a/layouts/partials/openapi/render-object-table.html +++ b/layouts/partials/openapi/render-object-table.html @@ -335,7 +335,7 @@ resolve-additional-types.) {{ $stringFormat := "" }} {{ with index site.Data "string-formats" . }} - {{ $stringFormat = printf "%s" (htmlEscape .url) (htmlEscape .title) }} + {{ $stringFormat = printf "%s" (htmlEscape .url | relURL) (htmlEscape .title) }} {{ end }} {{ return $stringFormat }}