diff --git a/.changeset/docs-locales.md b/.changeset/docs-locales.md deleted file mode 100644 index 1d2f031..0000000 --- a/.changeset/docs-locales.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"@eventuras/lectio-docs": minor ---- - -Multilingual documentation sets, opt-in via `locales` / `defaultLocale` in -`DocsConfig`. A document's language comes from its frontmatter (`locale:` or -`language:` — the only option when the filename isn't ours, like a package's -`README.md`), else a filename suffix (`terms.nb.md`, the recommended -convention), else a path segment (`nb/terms.md`). Only configured locales are -recognised, so `notes.draft.md` and `apps/v2/README.md` aren't mistaken for -translations. - -The marker is stripped from the slug, so every translation of a document shares -one URL and stays one page in the nav. `getTree(locale)`, `getPages(locale)` and -`getPage(slug, locale)` resolve to the closest version available and report the -locale the page is actually written in, so a host can tell the reader when they -got a fallback; `getLocales()` lists what the manifest holds. Untranslated pages -stay in the tree rather than being hidden. - -Omit `locales` and nothing changes: pages carry no `locale`, manifests are -byte-identical to before, and the existing no-argument calls behave exactly as -they always have. diff --git a/.changeset/frontmatter-reader.md b/.changeset/frontmatter-reader.md deleted file mode 100644 index d2d14ca..0000000 --- a/.changeset/frontmatter-reader.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"@eventuras/lectio-docs": minor ---- - -`parseFrontmatter` is exported from `./content` — the collector's private reader, -now shared instead of duplicated. It is deliberately not a YAML parser: scalar -`key: value` lines, values left as written, which is what documentation -frontmatter actually is and what keeps the dependency tree at what the collector -and the search index genuinely need. - -What it can't represent — lists, nested maps, block and flow scalars — it now -names in `unsupportedKeys` instead of dropping in silence, and `collect()` warns -per file. A reader this small is fine; one that loses a `tags:` list without -saying so is not. diff --git a/.changeset/runtime-manifests-and-links.md b/.changeset/runtime-manifests-and-links.md deleted file mode 100644 index df365f9..0000000 --- a/.changeset/runtime-manifests-and-links.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@eventuras/lectio-docs": minor ---- - -Build a manifest without `collect()`, and resolve the links documents make to -each other. - -`pathToPage` exports the file-to-page logic the collector uses — the slug a path -gets, and the language it is written in — so a host whose content changes -without a rebuild can assemble a manifest at runtime and still get the tree, -the locale fallback and the search index. `pathToSlug`, `pathToLocale`, -`normalizeSlug` and `resolveRelativePath` come with it, all pure and -dependency-free. - -`source.resolveLink(href, fromSource)` maps a relative `*.md` link to the page -it means, resolved against the source path of the document containing it rather -than against a bare filename. Two sections can then each hold a `config.md` -without `[overview](../guides/config.md)` becoming ambiguous, and a link from -`nb/privacy.md` to `terms.md` lands on the Norwegian version of that page. - -A `slug:` in frontmatter now overrides the path-derived slug, so a document can -keep a short, stable URL while its filename stays descriptive. Translations that -disagree on the slug they declare are warned about while collecting — they would -otherwise quietly stop being one page. diff --git a/.changeset/starter-config.md b/.changeset/starter-config.md deleted file mode 100644 index d9ce92a..0000000 --- a/.changeset/starter-config.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@eventuras/lectio-docs": minor ---- - -With no `docs.config.ts`, the CLI now generates an opinionated starter from the -repo's shape: root `docs/` first, then app readmes and docs under `/apps`, then -`/packages` and `/libs`. Name variants share a group (`apps/` or `Applications/`, -`libs/` or `Libraries/`), and repos with none of these directories keep the -whole-tree `**/*.md` sweep. - -Source order is sidebar order, so the generated config *is* the navigation — -configuring it means editing the file it wrote. diff --git a/.changeset/tree-order-home-and-adrs.md b/.changeset/tree-order-home-and-adrs.md deleted file mode 100644 index 5ffd69b..0000000 --- a/.changeset/tree-order-home-and-adrs.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@eventuras/lectio-docs": patch ---- - -`buildTree` puts the home page first and sinks decision-record sections (`adr`, -`adrs`, `decisions`) to the bottom of the level they sit on. ADRs are reference -material read after the narrative docs, and manifest order — which is glob -order — otherwise scattered them mid-nav. diff --git a/apps/site-builder/CHANGELOG.md b/apps/site-builder/CHANGELOG.md index 34625b6..2d7ed4b 100644 --- a/apps/site-builder/CHANGELOG.md +++ b/apps/site-builder/CHANGELOG.md @@ -1,5 +1,17 @@ # lectio-docs +## 0.2.3 + +### Patch Changes + +- Updated dependencies [e8dc6b3] +- Updated dependencies [e8dc6b3] +- Updated dependencies [453347d] +- Updated dependencies [c8153bb] +- Updated dependencies [47461aa] + - @eventuras/lectio-docs@0.4.0 + - @eventuras/lectio-docs-react@0.1.3 + ## 0.2.2 ### Patch Changes diff --git a/apps/site-builder/package.json b/apps/site-builder/package.json index 6a278ba..7f7ddc9 100644 --- a/apps/site-builder/package.json +++ b/apps/site-builder/package.json @@ -1,6 +1,6 @@ { "name": "lectio-docs", - "version": "0.2.2", + "version": "0.2.3", "description": "Run one command, get a docs site: collects scattered repo docs and builds a static, searchable site.", "license": "MIT", "repository": { diff --git a/packages/lectio-docs-react/CHANGELOG.md b/packages/lectio-docs-react/CHANGELOG.md index 771e78d..0c24a72 100644 --- a/packages/lectio-docs-react/CHANGELOG.md +++ b/packages/lectio-docs-react/CHANGELOG.md @@ -1,5 +1,16 @@ # @eventuras/lectio-docs-react +## 0.1.3 + +### Patch Changes + +- Updated dependencies [e8dc6b3] +- Updated dependencies [e8dc6b3] +- Updated dependencies [453347d] +- Updated dependencies [c8153bb] +- Updated dependencies [47461aa] + - @eventuras/lectio-docs@0.4.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/lectio-docs-react/package.json b/packages/lectio-docs-react/package.json index 7a7e035..c278208 100644 --- a/packages/lectio-docs-react/package.json +++ b/packages/lectio-docs-react/package.json @@ -1,6 +1,6 @@ { "name": "@eventuras/lectio-docs-react", - "version": "0.1.2", + "version": "0.1.3", "description": "React bindings for @eventuras/lectio-docs: a headless search hook, plus an optional ratio-ui search component.", "keywords": [ "documentation", diff --git a/packages/lectio-docs/CHANGELOG.md b/packages/lectio-docs/CHANGELOG.md index a1d4cf2..f13adc6 100644 --- a/packages/lectio-docs/CHANGELOG.md +++ b/packages/lectio-docs/CHANGELOG.md @@ -1,5 +1,76 @@ # @eventuras/docs-framework +## 0.4.0 + +### Minor Changes + +- e8dc6b3: Multilingual documentation sets, opt-in via `locales` / `defaultLocale` in + `DocsConfig`. A document's language comes from its frontmatter (`locale:` or + `language:` — the only option when the filename isn't ours, like a package's + `README.md`), else a filename suffix (`terms.nb.md`, the recommended + convention), else a path segment (`nb/terms.md`). Only configured locales are + recognised, so `notes.draft.md` and `apps/v2/README.md` aren't mistaken for + translations. + + The marker is stripped from the slug, so every translation of a document shares + one URL and stays one page in the nav. `getTree(locale)`, `getPages(locale)` and + `getPage(slug, locale)` resolve to the closest version available and report the + locale the page is actually written in, so a host can tell the reader when they + got a fallback; `getLocales()` lists what the manifest holds. Untranslated pages + stay in the tree rather than being hidden. + + Omit `locales` and nothing changes: pages carry no `locale`, manifests are + byte-identical to before, and the existing no-argument calls behave exactly as + they always have. + +- e8dc6b3: `parseFrontmatter` is exported from `./content` — the collector's private reader, + now shared instead of duplicated. It is deliberately not a YAML parser: scalar + `key: value` lines, values left as written, which is what documentation + frontmatter actually is and what keeps the dependency tree at what the collector + and the search index genuinely need. + + What it can't represent — lists, nested maps, block and flow scalars — it now + names in `unsupportedKeys` instead of dropping in silence, and `collect()` warns + per file. A reader this small is fine; one that loses a `tags:` list without + saying so is not. + +- 453347d: Build a manifest without `collect()`, and resolve the links documents make to + each other. + + `pathToPage` exports the file-to-page logic the collector uses — the slug a path + gets, and the language it is written in — so a host whose content changes + without a rebuild can assemble a manifest at runtime and still get the tree, + the locale fallback and the search index. `pathToSlug`, `pathToLocale`, + `normalizeSlug` and `resolveRelativePath` come with it, all pure and + dependency-free. + + `source.resolveLink(href, fromSource)` maps a relative `*.md` link to the page + it means, resolved against the source path of the document containing it rather + than against a bare filename. Two sections can then each hold a `config.md` + without `[overview](../guides/config.md)` becoming ambiguous, and a link from + `nb/privacy.md` to `terms.md` lands on the Norwegian version of that page. + + A `slug:` in frontmatter now overrides the path-derived slug, so a document can + keep a short, stable URL while its filename stays descriptive. Translations that + disagree on the slug they declare are warned about while collecting — they would + otherwise quietly stop being one page. + +- c8153bb: With no `docs.config.ts`, the CLI now generates an opinionated starter from the + repo's shape: root `docs/` first, then app readmes and docs under `/apps`, then + `/packages` and `/libs`. Name variants share a group (`apps/` or `Applications/`, + `libs/` or `Libraries/`), and repos with none of these directories keep the + whole-tree `**/*.md` sweep. + + Source order is sidebar order, so the generated config _is_ the navigation — + configuring it means editing the file it wrote. + +### Patch Changes + +- 47461aa: `buildTree` puts the home page first and sinks decision-record sections (`adr`, + `adrs`, `decisions`) to the bottom of the level they sit on. ADRs are reference + material read after the narrative docs, and manifest order — which is glob + order — otherwise scattered them mid-nav. + ## 0.3.1 ### Patch Changes diff --git a/packages/lectio-docs/package.json b/packages/lectio-docs/package.json index a36ab9c..01c3c8a 100644 --- a/packages/lectio-docs/package.json +++ b/packages/lectio-docs/package.json @@ -1,6 +1,6 @@ { "name": "@eventuras/lectio-docs", - "version": "0.3.1", + "version": "0.4.0", "description": "Headless, framework-agnostic toolkit for collecting documentation scattered across a repository into one content source, with full-text search.", "keywords": [ "documentation",