- JavaScript 100%
|
Some checks failed
Rebuild datasets when Atlas changes / dispatch (glossary) (push) Failing after 1s
Rebuild datasets when Atlas changes / dispatch (books) (push) Failing after 2s
Rebuild datasets when Atlas changes / dispatch (people) (push) Failing after 2s
Rebuild datasets when Atlas changes / dispatch (writings) (push) Failing after 2s
- Changed package name from "@heterarchy/atlas" to "@heterarchy-society/atlas" in README.md. - Updated submodule commits for datasets (books, glossary, people, writings) to ensure consistency with the latest changes. |
||
|---|---|---|
| .github/workflows | ||
| bin | ||
| datasets | ||
| lib | ||
| scripts | ||
| .gitignore | ||
| .gitmodules | ||
| .npmignore | ||
| bun.lock | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
Atlas
Build tooling for Heterarchy data collections. Reads source files (Markdown, YAML, TOML), validates them against JSON schemas, and emits static JS/JSON bundles consumed by the site.
Install
npm install
Or use it as a dependency in a dataset repo:
npm install @heterarchy-society/atlas
Usage
heterarchy-atlas <command>
| Command | Description |
|---|---|
build |
Build dist/ from collection sources |
validate |
Validate all source files against schema |
unresolved |
Show unresolved [[wiki links]] |
stale |
Show translations with an outdated source hash |
translate [lang] [id] |
Translate missing/stale entries via Codex CLI |
resolve-authors |
Resolve GitHub usernames from git emails |
From the atlas repo root, push all dataset submodules and then this repo to Radicle:
npm run push-rad
Uses each repo’s rad remote and branch main (override with RAD_REMOTE / RAD_BRANCH). Datasets are pushed first, then atlas (so submodule pointers on main stay in sync).
Configuration
Each dataset repo needs a config.toml. A single collection:
[collection]
name = "glossary"
source_dir = "glossary"
format = "md" # md | yaml | toml
output_key = "terms"
git_history = true # emit per-item git history to dist/
schema = "term.json" # optional — omit to skip item validation
heterarchy-atlas validate only checks items when schema is set (path under schema/). Redirects in redirects.yaml are still validated. Without schema, the command skips item checks and exits successfully.
Multiple collections use [[collections]] (array syntax).
The optional [output] section controls where build artifacts land:
[output]
dir = "dist" # default
Build output
heterarchy-atlas build writes one JS module per collection plus a combined JSON index:
dist/
terms.js # export default { meta, terms: [...] }
index.json # all collections merged
If git_history = true, a dist/<output_key>-history.json is also written with per-item commit history.
Redirects
When an item id is renamed, record the old id in redirects.yaml at the dataset repo root:
# redirects.yaml
mario: mario-havel
Validation checks that targets exist, sources are not live ids, and there are no redirect chains. Build emits the map into dist/index.json under meta.redirects for the frontend.
Optional path override in config.toml:
redirects = "redirects.yaml"
Wiki links
Markdown descriptions use [[wiki links]]. Atlas does not resolve or validate them at build time; the site frontend resolves targets against loaded datasets.
| Syntax | Meaning |
|---|---|
[[bitcoin]] |
Glossary term bitcoin (id and label are the same) |
[[bitcoin|bit gold]] |
Glossary id → visible label (MediaWiki order) |
[Timothy C. May](people:timothy-c-may) |
Person profile (standard markdown link) |
[Bitcoin whitepaper](writings:bitcoin-whitepaper) |
Writing in the writings dataset |
Use [[…]] only for glossary terms, in MediaWiki pipe order: [[target\|display]] — left is the term id, right is what readers see. Cross-dataset links use markdown [label](collection:id).
In writings, authors in frontmatter are linked on the site automatically; use plain names in the description body instead of [Author](people:id).
The unresolved command only checks glossary-to-glossary links within a single glossary dataset (legacy helper for authors).
Atlas scripts hook
Drop an atlas-scripts.js (or .ts) in the dataset root to transform items at build time:
export default {
transform(item, { allItems, config, col, rootDir }) {
return { ...item, slug: item.id.toLowerCase() }
}
}
Translations
heterarchy-atlas translate uses Codex CLI to translate glossary entries. Configuration lives in config.toml:
[languages]
default = "cs"
[languages.cs]
name = "Czech"
[translation]
prompt = "..." # bootstrap prompt (first term in a session)
resume_prompt = "..." # short prompt for subsequent terms
Sessions are stored in .translation-session-{lang} (git-ignored) so terminology stays consistent across terms in the same run.
heterarchy-atlas translate # interactive — prompts for each stale/missing term
heterarchy-atlas translate cs # same, explicit language
heterarchy-atlas translate cs tor # translate a single term non-interactively
Datasets
datasets/glossary— reference glossary for the parallel societydatasets/books— book recommendationsdatasets/writings— primary source textsdatasets/people— people and contributors referenced by the project
Adding a new dataset
-
Create the dataset repo with a
config.toml,package.json,.github/workflows/deploy.yml, and.gitignore— use an existing dataset as a template. -
Add it as a submodule in this repo:
git submodule add git@github.com:heterarchy-society/<name>.git datasets/<name> -
Register it in the rebuild workflow — add the repo name to the matrix in
.github/workflows/rebuild-datasets.yml:repo: ["books", "glossary", "writings", "<name>"]This ensures the dataset is rebuilt automatically whenever Atlas itself is updated.
-
Update
DATASET_DISPATCH_TOKEN— the token in GitHub repository secrets must havecontents: writeaccess to the new repo. Regenerate or update it at github.com/settings/personal-access-tokens. -
Update
WEB_DISPATCH_TOKENin the new dataset repo's secrets — this token is used by the dataset's deploy workflow to trigger a website rebuild after each deploy. It needscontents: writeaccess to theheterarchy-society/heterarchy.fyirepo.