mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Load versions.json as a resource if we're in the unstable spec (#2258)
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
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
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
a5afe542c0
commit
22c0952003
|
|
@ -82,7 +82,14 @@ function appendVersion(parent, name, url) {
|
|||
a.appendChild(text);
|
||||
}
|
||||
|
||||
fetch("/latest/versions.json")
|
||||
// If we're in the unstable version, we're the latest thing and can just load
|
||||
// versions.json from our own resources. Otherwise, we fall back to loading it
|
||||
// from /unstable/versions.json, assuming we are on the spec.matrix.org deployment.
|
||||
const url = currentVersion === "unstable"
|
||||
? '{{ "/" | relURL }}versions.json'
|
||||
: "/unstable/versions.json";
|
||||
|
||||
fetch(url)
|
||||
.then(r => r.json())
|
||||
.then(versions => {
|
||||
// Find the surrounding list element
|
||||
|
|
|
|||
1
changelogs/internal/newsfragments/2258.clarification
Normal file
1
changelogs/internal/newsfragments/2258.clarification
Normal file
|
|
@ -0,0 +1 @@
|
|||
Add version picker in the navbar.
|
||||
Loading…
Reference in a new issue