From 00169abcdbe2522cdd9ae19c703420adaed8893f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 4 Jan 2022 20:29:10 -0700 Subject: [PATCH] Specify module order manually to work around hugo issues (#3612) --- content/client-server-api/_index.md | 35 ++++++++++++++++++- .../client-server-api/modules/account_data.md | 1 - content/client-server-api/modules/admin.md | 1 - .../client-server-api/modules/content_repo.md | 3 +- .../modules/device_management.md | 1 - content/client-server-api/modules/dm.md | 1 - .../modules/end_to_end_encryption.md | 1 - .../modules/event_context.md | 1 - .../client-server-api/modules/guest_access.md | 1 - .../modules/history_visibility.md | 1 - .../client-server-api/modules/ignore_users.md | 1 - .../modules/instant_messaging.md | 1 - content/client-server-api/modules/mentions.md | 1 - .../modules/moderation_policies.md | 1 - content/client-server-api/modules/openid.md | 1 - content/client-server-api/modules/presence.md | 1 - content/client-server-api/modules/push.md | 1 - .../client-server-api/modules/read_markers.md | 1 - content/client-server-api/modules/receipts.md | 1 - .../modules/report_content.md | 1 - .../modules/room_previews.md | 1 - .../modules/room_upgrades.md | 1 - content/client-server-api/modules/search.md | 1 - content/client-server-api/modules/secrets.md | 1 - .../modules/send_to_device.md | 1 - .../client-server-api/modules/server_acls.md | 1 - .../modules/server_notices.md | 5 ++- .../client-server-api/modules/sso_login.md | 1 - content/client-server-api/modules/stickers.md | 1 - content/client-server-api/modules/tags.md | 1 - .../modules/third_party_invites.md | 1 - .../modules/third_party_networks.md | 1 - .../modules/typing_notifications.md | 1 - .../client-server-api/modules/voip_events.md | 1 - layouts/shortcodes/cs-module.html | 13 +++++++ layouts/shortcodes/cs-modules.html | 14 -------- 36 files changed, 50 insertions(+), 51 deletions(-) create mode 100644 layouts/shortcodes/cs-module.html delete mode 100644 layouts/shortcodes/cs-modules.html diff --git a/content/client-server-api/_index.md b/content/client-server-api/_index.md index c48983d3b87..5e2522af8b7 100644 --- a/content/client-server-api/_index.md +++ b/content/client-server-api/_index.md @@ -2177,4 +2177,37 @@ operations and run in a resource constrained environment. Like embedded applications, they are not intended to be fully-fledged communication systems. -{{% cs-modules %}} +{{% cs-module name="instant_messaging" %}} +{{% cs-module name="voip_events" %}} +{{% cs-module name="typing_notifications" %}} +{{% cs-module name="receipts" %}} +{{% cs-module name="read_markers" %}} +{{% cs-module name="presence" %}} +{{% cs-module name="content_repo" %}} +{{% cs-module name="send_to_device" %}} +{{% cs-module name="device_management" %}} +{{% cs-module name="end_to_end_encryption" %}} +{{% cs-module name="secrets" %}} +{{% cs-module name="history_visibility" %}} +{{% cs-module name="push" %}} +{{% cs-module name="third_party_invites" %}} +{{% cs-module name="search" %}} +{{% cs-module name="guest_access" %}} +{{% cs-module name="room_previews" %}} +{{% cs-module name="tags" %}} +{{% cs-module name="account_data" %}} +{{% cs-module name="admin" %}} +{{% cs-module name="event_context" %}} +{{% cs-module name="sso_login" %}} +{{% cs-module name="dm" %}} +{{% cs-module name="ignore_users" %}} +{{% cs-module name="stickers" %}} +{{% cs-module name="report_content" %}} +{{% cs-module name="third_party_networks" %}} +{{% cs-module name="openid" %}} +{{% cs-module name="server_acls" %}} +{{% cs-module name="mentions" %}} +{{% cs-module name="room_upgrades" %}} +{{% cs-module name="server_notices" %}} +{{% cs-module name="moderation_policies" %}} +{{% cs-module name="spaces" %}} diff --git a/content/client-server-api/modules/account_data.md b/content/client-server-api/modules/account_data.md index 2ae3468645c..500e2bbbb6e 100644 --- a/content/client-server-api/modules/account_data.md +++ b/content/client-server-api/modules/account_data.md @@ -1,6 +1,5 @@ --- type: module -weight: 190 --- ### Client Config diff --git a/content/client-server-api/modules/admin.md b/content/client-server-api/modules/admin.md index 1f0cbe2225a..6dd32fed9c4 100644 --- a/content/client-server-api/modules/admin.md +++ b/content/client-server-api/modules/admin.md @@ -1,6 +1,5 @@ --- type: module -weight: 200 --- ### Server Administration diff --git a/content/client-server-api/modules/content_repo.md b/content/client-server-api/modules/content_repo.md index fba296a064c..467065a57b7 100644 --- a/content/client-server-api/modules/content_repo.md +++ b/content/client-server-api/modules/content_repo.md @@ -1,6 +1,5 @@ --- type: module -weight: 70 --- ### Content repository @@ -68,7 +67,7 @@ methods: - 640x480, scale - 800x600, scale -In summary: +In summary: - "scale" maintains the original aspect ratio of the image - "crop" provides an image in the aspect ratio of the sizes given in the request diff --git a/content/client-server-api/modules/device_management.md b/content/client-server-api/modules/device_management.md index 2cf93f45a75..c27d0fc1537 100644 --- a/content/client-server-api/modules/device_management.md +++ b/content/client-server-api/modules/device_management.md @@ -1,6 +1,5 @@ --- type: module -weight: 90 --- ### Device Management diff --git a/content/client-server-api/modules/dm.md b/content/client-server-api/modules/dm.md index bd68a4dd20a..b86fde944a2 100644 --- a/content/client-server-api/modules/dm.md +++ b/content/client-server-api/modules/dm.md @@ -1,6 +1,5 @@ --- type: module -weight: 230 --- ### Direct Messaging diff --git a/content/client-server-api/modules/end_to_end_encryption.md b/content/client-server-api/modules/end_to_end_encryption.md index 7056a1b9f4e..7ac7c086971 100644 --- a/content/client-server-api/modules/end_to_end_encryption.md +++ b/content/client-server-api/modules/end_to_end_encryption.md @@ -1,6 +1,5 @@ --- type: module -weight: 100 --- ### End-to-End Encryption diff --git a/content/client-server-api/modules/event_context.md b/content/client-server-api/modules/event_context.md index 65b1a7a4f52..7bd678f5d65 100644 --- a/content/client-server-api/modules/event_context.md +++ b/content/client-server-api/modules/event_context.md @@ -1,6 +1,5 @@ --- type: module -weight: 210 --- ### Event Context diff --git a/content/client-server-api/modules/guest_access.md b/content/client-server-api/modules/guest_access.md index 8b4c985c635..dbdc2bfb156 100644 --- a/content/client-server-api/modules/guest_access.md +++ b/content/client-server-api/modules/guest_access.md @@ -1,6 +1,5 @@ --- type: module -weight: 160 --- ### Guest Access diff --git a/content/client-server-api/modules/history_visibility.md b/content/client-server-api/modules/history_visibility.md index 0a00f01eecb..175171f8aec 100644 --- a/content/client-server-api/modules/history_visibility.md +++ b/content/client-server-api/modules/history_visibility.md @@ -1,6 +1,5 @@ --- type: module -weight: 120 --- ### Room History Visibility diff --git a/content/client-server-api/modules/ignore_users.md b/content/client-server-api/modules/ignore_users.md index 1b7282fcdf0..6e67008eba6 100644 --- a/content/client-server-api/modules/ignore_users.md +++ b/content/client-server-api/modules/ignore_users.md @@ -1,6 +1,5 @@ --- type: module -weight: 240 --- ### Ignoring Users diff --git a/content/client-server-api/modules/instant_messaging.md b/content/client-server-api/modules/instant_messaging.md index 72c9b80f380..3ca5668dafc 100644 --- a/content/client-server-api/modules/instant_messaging.md +++ b/content/client-server-api/modules/instant_messaging.md @@ -1,6 +1,5 @@ --- type: module -weight: 10 --- ### Instant Messaging diff --git a/content/client-server-api/modules/mentions.md b/content/client-server-api/modules/mentions.md index f6f9084ae85..924c413d6c8 100644 --- a/content/client-server-api/modules/mentions.md +++ b/content/client-server-api/modules/mentions.md @@ -1,6 +1,5 @@ --- type: module -weight: 300 --- ### User, room, and group mentions diff --git a/content/client-server-api/modules/moderation_policies.md b/content/client-server-api/modules/moderation_policies.md index c164b1b1e75..ee649e03492 100644 --- a/content/client-server-api/modules/moderation_policies.md +++ b/content/client-server-api/modules/moderation_policies.md @@ -1,6 +1,5 @@ --- type: module -weight: 330 --- ### Moderation policy lists diff --git a/content/client-server-api/modules/openid.md b/content/client-server-api/modules/openid.md index c51591fe4c7..e7cadcfcbc0 100644 --- a/content/client-server-api/modules/openid.md +++ b/content/client-server-api/modules/openid.md @@ -1,6 +1,5 @@ --- type: module -weight: 280 --- ### OpenID diff --git a/content/client-server-api/modules/presence.md b/content/client-server-api/modules/presence.md index 9944f086c48..96cff115616 100644 --- a/content/client-server-api/modules/presence.md +++ b/content/client-server-api/modules/presence.md @@ -1,6 +1,5 @@ --- type: module -weight: 60 --- ### Presence diff --git a/content/client-server-api/modules/push.md b/content/client-server-api/modules/push.md index 0f7c7eebd21..70c61ea5ce2 100644 --- a/content/client-server-api/modules/push.md +++ b/content/client-server-api/modules/push.md @@ -1,6 +1,5 @@ --- type: module -weight: 130 --- ### Push Notifications diff --git a/content/client-server-api/modules/read_markers.md b/content/client-server-api/modules/read_markers.md index a2c0150b7bc..4ee079386b7 100644 --- a/content/client-server-api/modules/read_markers.md +++ b/content/client-server-api/modules/read_markers.md @@ -1,6 +1,5 @@ --- type: module -weight: 50 --- ### Fully read markers diff --git a/content/client-server-api/modules/receipts.md b/content/client-server-api/modules/receipts.md index fb28aacd7ba..1abd45a5895 100644 --- a/content/client-server-api/modules/receipts.md +++ b/content/client-server-api/modules/receipts.md @@ -1,6 +1,5 @@ --- type: module -weight: 40 --- ### Receipts diff --git a/content/client-server-api/modules/report_content.md b/content/client-server-api/modules/report_content.md index c6157f3c5bf..3b32ff8d81d 100644 --- a/content/client-server-api/modules/report_content.md +++ b/content/client-server-api/modules/report_content.md @@ -1,6 +1,5 @@ --- type: module -weight: 260 --- ### Reporting Content diff --git a/content/client-server-api/modules/room_previews.md b/content/client-server-api/modules/room_previews.md index 5e31b647221..ea5e324e406 100644 --- a/content/client-server-api/modules/room_previews.md +++ b/content/client-server-api/modules/room_previews.md @@ -1,6 +1,5 @@ --- type: module -weight: 170 --- ### Room Previews diff --git a/content/client-server-api/modules/room_upgrades.md b/content/client-server-api/modules/room_upgrades.md index 6760d9d7c72..e9794dea1a9 100644 --- a/content/client-server-api/modules/room_upgrades.md +++ b/content/client-server-api/modules/room_upgrades.md @@ -1,6 +1,5 @@ --- type: module -weight: 310 --- ### Room Upgrades diff --git a/content/client-server-api/modules/search.md b/content/client-server-api/modules/search.md index 2fa5bc44ee2..bcd381882ff 100644 --- a/content/client-server-api/modules/search.md +++ b/content/client-server-api/modules/search.md @@ -1,6 +1,5 @@ --- type: module -weight: 150 --- ### Server Side Search diff --git a/content/client-server-api/modules/secrets.md b/content/client-server-api/modules/secrets.md index 1ef626c00d0..17b515c7667 100644 --- a/content/client-server-api/modules/secrets.md +++ b/content/client-server-api/modules/secrets.md @@ -1,6 +1,5 @@ --- type: module -weight: 110 --- ### Secrets diff --git a/content/client-server-api/modules/send_to_device.md b/content/client-server-api/modules/send_to_device.md index 5758fa01d1b..586e5416136 100644 --- a/content/client-server-api/modules/send_to_device.md +++ b/content/client-server-api/modules/send_to_device.md @@ -1,6 +1,5 @@ --- type: module -weight: 80 --- ### Send-to-Device messaging diff --git a/content/client-server-api/modules/server_acls.md b/content/client-server-api/modules/server_acls.md index fc3089155df..eaa4b275ca0 100644 --- a/content/client-server-api/modules/server_acls.md +++ b/content/client-server-api/modules/server_acls.md @@ -1,6 +1,5 @@ --- type: module -weight: 290 --- ### Server Access Control Lists (ACLs) for rooms diff --git a/content/client-server-api/modules/server_notices.md b/content/client-server-api/modules/server_notices.md index 199acd85bc9..b0e2fa22b65 100644 --- a/content/client-server-api/modules/server_notices.md +++ b/content/client-server-api/modules/server_notices.md @@ -1,6 +1,5 @@ --- type: module -weight: 320 --- ### Server Notices @@ -25,12 +24,12 @@ ignored by clients. The specified values for `server_notice_type` are: -`m.server_notice.usage_limit_reached` +`m.server_notice.usage_limit_reached` The server has exceeded some limit which requires the server administrator to intervene. The `limit_type` describes the kind of limit reached. The specified values for `limit_type` are: -`monthly_active_user` +`monthly_active_user` The server's number of active users in the last 30 days has exceeded the maximum. New connections are being refused by the server. What defines "active" is left as an implementation detail, however servers are diff --git a/content/client-server-api/modules/sso_login.md b/content/client-server-api/modules/sso_login.md index 3318aea0161..67d236a3f2a 100644 --- a/content/client-server-api/modules/sso_login.md +++ b/content/client-server-api/modules/sso_login.md @@ -1,6 +1,5 @@ --- type: module -weight: 220 --- ### SSO client login/authentication diff --git a/content/client-server-api/modules/stickers.md b/content/client-server-api/modules/stickers.md index 234ebba25fb..aa10a655e24 100644 --- a/content/client-server-api/modules/stickers.md +++ b/content/client-server-api/modules/stickers.md @@ -1,6 +1,5 @@ --- type: module -weight: 250 --- ### Sticker Messages diff --git a/content/client-server-api/modules/tags.md b/content/client-server-api/modules/tags.md index c47be0c1d9e..379cce8bf20 100644 --- a/content/client-server-api/modules/tags.md +++ b/content/client-server-api/modules/tags.md @@ -1,6 +1,5 @@ --- type: module -weight: 180 --- ### Room Tagging diff --git a/content/client-server-api/modules/third_party_invites.md b/content/client-server-api/modules/third_party_invites.md index 4a5c63e50c3..2635347dd72 100644 --- a/content/client-server-api/modules/third_party_invites.md +++ b/content/client-server-api/modules/third_party_invites.md @@ -1,6 +1,5 @@ --- type: module -weight: 140 --- ### Third party invites diff --git a/content/client-server-api/modules/third_party_networks.md b/content/client-server-api/modules/third_party_networks.md index 40ca1883ec3..924d820b1df 100644 --- a/content/client-server-api/modules/third_party_networks.md +++ b/content/client-server-api/modules/third_party_networks.md @@ -1,6 +1,5 @@ --- type: module -weight: 270 --- ### Third Party Networks diff --git a/content/client-server-api/modules/typing_notifications.md b/content/client-server-api/modules/typing_notifications.md index b9254cdb909..722c011f101 100644 --- a/content/client-server-api/modules/typing_notifications.md +++ b/content/client-server-api/modules/typing_notifications.md @@ -1,6 +1,5 @@ --- type: module -weight: 30 --- ### Typing Notifications diff --git a/content/client-server-api/modules/voip_events.md b/content/client-server-api/modules/voip_events.md index db33eb4c039..b4930facb7e 100644 --- a/content/client-server-api/modules/voip_events.md +++ b/content/client-server-api/modules/voip_events.md @@ -1,6 +1,5 @@ --- type: module -weight: 20 --- ### Voice over IP diff --git a/layouts/shortcodes/cs-module.html b/layouts/shortcodes/cs-module.html new file mode 100644 index 00000000000..bd407df6fb9 --- /dev/null +++ b/layouts/shortcodes/cs-module.html @@ -0,0 +1,13 @@ +{{/* + + This template is used to render a Client-Server API Module. Modules are defined + alongside the `_index.md` for the CS API. + + The `name` parameter is the file name without extension. + +*/}} + +{{ $name := .Params.name }} + +{{ $page := .Site.GetPage (path.Join .Page.Dir "modules" (printf "%s%s" $name ".md"))}} +{{ $page.Content }} \ No newline at end of file diff --git a/layouts/shortcodes/cs-modules.html b/layouts/shortcodes/cs-modules.html deleted file mode 100644 index eb294166262..00000000000 --- a/layouts/shortcodes/cs-modules.html +++ /dev/null @@ -1,14 +0,0 @@ -{{/* - - This template is used to embed module documentation in the client-server API spec. - - It searches the site for pages of type "module", sorts them by weight, and - emits the page's rendered content. - -*/}} - -{{ $modules := where site.Pages "Type" "module" }} - -{{ range $modules.ByWeight }} -{{ .Content }} -{{ end }}