Skip to content

Commit 65f0598

Browse files
committed
Use versions.json method for sphinx-material
Otherwise don't think we can get links working on nested pages Notably this usually won't work locally - see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp
1 parent 5eec16c commit 65f0598

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

spec/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ clean:
2525

2626
build:
2727
-mkdir -p $(BUILDDIR)
28+
-cp "$(SOURCEDIR)/versions.json" "$(BUILDDIR)/versions.json"
2829
-sphinx-build "$(SOURCEDIR)/2021.12" "$(BUILDDIR)/2021.12"
2930
-cp -r "$(BUILDDIR)/2021.12" "$(BUILDDIR)/latest"
3031
-sphinx-build "$(SOURCEDIR)/draft" "$(BUILDDIR)/draft"

spec/versions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"2021.12": "2021.12",
3+
"latest": "latest",
4+
"draft": "draft"
5+
}

src/_spec_conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
},
174174

175175
"version_dropdown": True,
176-
"version_info": {v: f"../{v}" for v in ["2021.12", "latest", "draft"]},
176+
"version_json": "../versions.json",
177177
"table_classes": ["plain"],
178178
}
179179

0 commit comments

Comments
 (0)