Skip to content

Commit a4ed64b

Browse files
rdhyeeclaude
andauthored
docs: clarify vocabulary page generation pipeline (#136)
Rewrites the Development section's vocab paragraph to describe the actual two-stage build: 1. TTL → markdown via the `vocab` CLI from isamplesorg/vocab_tools (installed via pipx in CI), driven by scripts/generate_vocab_docs.sh 2. markdown → HTML via `quarto render` applying _quarto.yml's theme, nav, and sidebar Also notes that scripts/vocab2md.py is no longer invoked (PR #48 switched to the `vocab markdown` CLI entry point — same tool, same transform) to prevent future confusion about which code produces the rendered vocabulary pages. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e2770a5 commit a4ed64b

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,23 @@ Preview the site:
4040
quarto preview
4141
```
4242

43-
Vocabulary documentation is generated from the vocabulary source ttl files using a python script, `scripts/vocab2md.py` and a convenience shell script wrapper, `scripts/generate_vocab_docs.sh`. To regenerate the vocabulary documentation, first `cd` to the root folder of the documentation, then:
43+
### Vocabulary page generation
44+
45+
The vocabulary pages under `models/generated/vocabularies/` (e.g. [material_sample_object_type.html](https://isamples.org/models/generated/vocabularies/material_sample_object_type.html)) are produced by a deterministic two-stage pipeline:
46+
47+
1. **TTL → markdown.** `scripts/generate_vocab_docs.sh` fetches each `.ttl` from [isamplesorg/vocabularies](https://github.com/isamplesorg/vocabularies) (and the extension repos) and runs `vocab markdown <ttl-url>` — the `vocab` CLI from [isamplesorg/vocab_tools](https://github.com/isamplesorg/vocab_tools), installed via `pipx` in CI. The output is written as a `.qmd` (core vocabularies) or `.md` (extensions) into `models/generated/`.
48+
2. **Markdown → HTML.** `quarto render` walks the site and applies the theme, navigation, and sidebar defined in `_quarto.yml` to every page, including the generated vocabulary markdown. The site chrome comes from Quarto; the vocabulary content is untouched.
49+
50+
Both stages run in the [`quarto-pages.yml`](.github/workflows/quarto-pages.yml) GitHub Action on every deploy.
51+
52+
To regenerate locally, from the repo root:
4453

4554
```
4655
scripts/generate_vocab_docs.sh
56+
quarto render
4757
```
4858

49-
The generated docs are placed under `models/generated/vocabularies`
59+
**Note on `scripts/vocab2md.py`.** An earlier version of this pipeline invoked `vocab2md.py` directly. PR [#48](https://github.com/isamplesorg/isamplesorg.github.io/pull/48) switched to the `vocab markdown` CLI entry point — same tool, same transform. The `vocab2md.py` file is retained for reference but is no longer part of the build.
5060

5161
After editing, push the sources to GitHub. The rendered pages are generated using the `Render using Quarto and push to GH-pages` GitHub action that is currently manually triggered.
5262

0 commit comments

Comments
 (0)