Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion myst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pre_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: ""
---
Expand Down
Loading