From ad9b35c47ceeb404748b6fc8b88ab1d081a92c50 Mon Sep 17 00:00:00 2001 From: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> Date: Fri, 11 Sep 2026 11:52:51 +0200 Subject: [PATCH 1/3] feat: Prefix generated anchors with version --- pre_build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pre_build.py b/pre_build.py index aa7af6cd..eefe1a48 100644 --- a/pre_build.py +++ b/pre_build.py @@ -4,6 +4,7 @@ from pathlib import Path import jsonc as json import logging +from _version import __version__ # Suppress warnings from json-schema-for-humans about unresolvable URLs logging.getLogger().setLevel(logging.ERROR) @@ -51,7 +52,7 @@ def build_json_examples(): for json_file in json_files: print(f'Processing {json_file}...') - crossref = f"examples:{category}:{Path(json_file).stem}" + crossref = f"{__version__}:examples:{category}:{Path(json_file).stem}" index_md += f"- [{Path(json_file).stem}](#{crossref})\n" json_file_name = Path(json_file).stem @@ -118,7 +119,7 @@ def build_json_schemas(): # insert mySt cross-reference at top of markdown files with open(output_path_md, 'r', encoding='utf-8') as md_file: md_content = md_file.read() - crossref = f"schemas:{Path(schema_file).stem}" + crossref = f"{__version__}:schemas:{Path(schema_file).stem}" md_content = f"""--- author: "" --- From e90f285c1e8959beb97e8a86f9156a3f8b4fe220 Mon Sep 17 00:00:00 2001 From: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> Date: Fri, 11 Sep 2026 11:53:01 +0200 Subject: [PATCH 2/3] docs: exclude index.md from children pages --- myst.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myst.yml b/myst.yml index f4482dfc..866a0b72 100644 --- a/myst.yml +++ b/myst.yml @@ -98,7 +98,7 @@ project: - file: index.md - file: examples/index.md children: - - pattern: examples/**/*.md + - pattern: examples/*/*.md - file: schemas/index.md children: - pattern: schemas/*.md From 5cfdd4fdd2bd16d8f8444a5371742fb3aaab6476 Mon Sep 17 00:00:00 2001 From: Johannes Soltwedel <38459088+jo-mueller@users.noreply.github.com> Date: Mon, 14 Sep 2026 12:47:37 +0200 Subject: [PATCH 3/3] docs: normalize anchors to hyphens --- pre_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pre_build.py b/pre_build.py index eefe1a48..a969ec79 100644 --- a/pre_build.py +++ b/pre_build.py @@ -52,7 +52,7 @@ def build_json_examples(): for json_file in json_files: print(f'Processing {json_file}...') - crossref = f"{__version__}:examples:{category}:{Path(json_file).stem}" + crossref = f"{__version__}-examples-{category}-{Path(json_file).stem}" index_md += f"- [{Path(json_file).stem}](#{crossref})\n" json_file_name = Path(json_file).stem @@ -119,7 +119,7 @@ def build_json_schemas(): # insert mySt cross-reference at top of markdown files with open(output_path_md, 'r', encoding='utf-8') as md_file: md_content = md_file.read() - crossref = f"{__version__}:schemas:{Path(schema_file).stem}" + crossref = f"{__version__}-schemas-{Path(schema_file).stem}" md_content = f"""--- author: "" ---