@heroiclands/package-build 23.13.0 → 24.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +2 -1
  3. package/assets/preview/gitea.ini +12 -7
  4. package/assets/styles/content-base.css +150 -1
  5. package/bin/content-commands.mjs +356 -210
  6. package/bin/package-build.mjs +3 -2
  7. package/ci/check-banners.mjs +7 -7
  8. package/config.mjs +21 -6
  9. package/content-config.mjs +199 -80
  10. package/docs/api.md +93 -72
  11. package/docs/authoring/links-and-markup.md +316 -78
  12. package/docs/commands.md +244 -78
  13. package/docs/configuration.md +210 -102
  14. package/docs/content-format.md +2 -2
  15. package/docs/diagnostics.md +2 -2
  16. package/docs/getting-started.md +1 -1
  17. package/docs/guides/icons.md +1 -1
  18. package/docs/guides/module-project.md +5 -8
  19. package/docs/guides/release-and-deploy.md +2 -2
  20. package/docs/guides/site.md +112 -23
  21. package/docs/guides/system-project.md +1 -1
  22. package/docs/guides/writing-in-invented-scripts.md +1247 -0
  23. package/docs/index.md +1 -0
  24. package/docs/project-setup.md +28 -30
  25. package/docs/reference/format-details.md +589 -308
  26. package/docs/reference/note-types.md +40 -10
  27. package/docs/reference/theme-pages.md +127 -108
  28. package/docs/source-preview.md +15 -1
  29. package/engine/asset-shipping.mjs +22 -10
  30. package/engine/base-compiler.mjs +62 -104
  31. package/engine/changelog-lint.mjs +1 -1
  32. package/engine/content-address.mjs +1 -1
  33. package/engine/content-alerts.mjs +8 -4
  34. package/engine/content-blocks.mjs +26 -11
  35. package/engine/content-embeds.mjs +1 -1
  36. package/engine/content-expand.mjs +376 -0
  37. package/engine/content-figures.mjs +13 -6
  38. package/engine/content-format.yaml +8 -0
  39. package/engine/content-glyphs.mjs +213 -0
  40. package/engine/content-images.mjs +6 -7
  41. package/engine/content-links.mjs +3 -3
  42. package/engine/content-lint.mjs +1 -1
  43. package/engine/content-render.mjs +453 -0
  44. package/engine/content-scripts.mjs +326 -27
  45. package/engine/content-spans.mjs +4 -1
  46. package/engine/content-styles.mjs +91 -0
  47. package/engine/content-symbols.mjs +186 -0
  48. package/engine/content-verse.mjs +6 -18
  49. package/engine/core-report.mjs +169 -0
  50. package/engine/core-vocabulary.mjs +208 -0
  51. package/engine/dictionary-html.mjs +119 -0
  52. package/engine/field-reference.mjs +1 -1
  53. package/engine/frontmatter-lint.mjs +1 -1
  54. package/engine/heading-attributes.mjs +89 -0
  55. package/engine/helpers.mjs +61 -101
  56. package/engine/homepage.mjs +17 -29
  57. package/engine/html-minify.mjs +70 -0
  58. package/engine/index.mjs +8 -5
  59. package/engine/language-rows.mjs +8 -2
  60. package/engine/language-terms.mjs +115 -14
  61. package/engine/language-words.mjs +12 -0
  62. package/engine/logographic.mjs +255 -0
  63. package/engine/map-lexicon.mjs +221 -25
  64. package/engine/map-places.mjs +5 -4
  65. package/engine/markdown-expressions.mjs +0 -2
  66. package/engine/markdownlint-run.mjs +9 -3
  67. package/engine/markup-validation.mjs +21 -0
  68. package/engine/metre-declaration.mjs +134 -0
  69. package/engine/note-matter.mjs +2 -2
  70. package/engine/note-vocabulary.mjs +187 -3
  71. package/engine/pdf-build.mjs +68 -133
  72. package/engine/pdf-render.mjs +102 -44
  73. package/engine/post-fields.mjs +157 -0
  74. package/engine/preview-index.mjs +130 -0
  75. package/engine/preview-source.mjs +450 -0
  76. package/engine/project-init.mjs +5 -12
  77. package/engine/prose-config.mjs +3 -3
  78. package/engine/run-words.mjs +3 -2
  79. package/engine/script-emphasis-terms.mjs +38 -0
  80. package/engine/script-emphasis.mjs +295 -0
  81. package/engine/script-font-delivery.mjs +4 -4
  82. package/engine/site-build.mjs +259 -314
  83. package/engine/site-config.mjs +26 -238
  84. package/engine/site-files.mjs +175 -0
  85. package/engine/site-index.mjs +9 -4
  86. package/engine/site-preview.mjs +50 -523
  87. package/engine/site-render.mjs +593 -0
  88. package/engine/site-root.mjs +22 -13
  89. package/engine/site-search.mjs +161 -0
  90. package/engine/site-serve.mjs +273 -0
  91. package/engine/site-theme-banner.mjs +154 -0
  92. package/engine/site-theme-urls.mjs +125 -0
  93. package/engine/site-theme.mjs +926 -0
  94. package/engine/text-maps.mjs +57 -10
  95. package/engine/typographer.mjs +248 -0
  96. package/engine/verse-metre.mjs +357 -0
  97. package/engine/wikilink-syntax.mjs +29 -47
  98. package/engine/wikilinks.mjs +758 -279
  99. package/engine/word-forms.mjs +39 -24
  100. package/engine/word-rows.mjs +12 -2
  101. package/engine/word-terms.mjs +29 -4
  102. package/manifest.mjs +3 -4
  103. package/package.json +10 -7
  104. package/{hugo-theme → site-theme}/data/banners.yaml +6 -10
  105. package/site-theme/layouts/base.hbs +31 -0
  106. package/site-theme/layouts/blog-list.hbs +30 -0
  107. package/site-theme/layouts/blog-post.hbs +40 -0
  108. package/site-theme/layouts/home.hbs +35 -0
  109. package/site-theme/layouts/list.hbs +20 -0
  110. package/site-theme/layouts/not-found.hbs +31 -0
  111. package/site-theme/layouts/page.hbs +7 -0
  112. package/site-theme/partials/copy-buttons.hbs +37 -0
  113. package/site-theme/partials/draft-notice.hbs +5 -0
  114. package/site-theme/partials/exturl.hbs +2 -0
  115. package/{hugo-theme/layouts/partials/footer.html → site-theme/partials/footer.hbs} +10 -7
  116. package/site-theme/partials/header.hbs +44 -0
  117. package/site-theme/partials/hero-banner.hbs +11 -0
  118. package/site-theme/partials/infobox-entry.hbs +2 -0
  119. package/site-theme/partials/infobox-section.hbs +31 -0
  120. package/site-theme/partials/infobox-value.hbs +2 -0
  121. package/site-theme/partials/infobox.hbs +18 -0
  122. package/site-theme/partials/list-members.hbs +9 -0
  123. package/site-theme/partials/nav-links.hbs +5 -0
  124. package/site-theme/partials/page-body.hbs +48 -0
  125. package/site-theme/partials/page-list.hbs +14 -0
  126. package/site-theme/partials/related.hbs +24 -0
  127. package/site-theme/partials/search-meta.hbs +6 -0
  128. package/site-theme/partials/search-names.hbs +2 -0
  129. package/site-theme/partials/search.hbs +52 -0
  130. package/site-theme/partials/tags.hbs +4 -0
  131. package/site-theme/partials/toc.hbs +7 -0
  132. package/{hugo-theme → site-theme}/static/css/style.css +14 -0
  133. package/stage.mjs +1 -2
  134. package/types/config.d.mts +8 -4
  135. package/types/content-config.d.mts +15 -15
  136. package/types/engine/asset-shipping.d.mts +5 -2
  137. package/types/engine/base-compiler.d.mts +20 -2
  138. package/types/engine/content-address.d.mts +1 -1
  139. package/types/engine/content-alerts.d.mts +8 -2
  140. package/types/engine/content-blocks.d.mts +11 -4
  141. package/types/engine/content-expand.d.mts +288 -0
  142. package/types/engine/content-figures.d.mts +11 -3
  143. package/types/engine/content-glyphs.d.mts +85 -0
  144. package/types/engine/content-images.d.mts +6 -7
  145. package/types/engine/content-links.d.mts +1 -1
  146. package/types/engine/content-render.d.mts +199 -0
  147. package/types/engine/content-scripts.d.mts +62 -0
  148. package/types/engine/content-spans.d.mts +1 -1
  149. package/types/engine/content-styles.d.mts +33 -0
  150. package/types/engine/content-symbols.d.mts +35 -0
  151. package/types/engine/core-report.d.mts +45 -0
  152. package/types/engine/core-vocabulary.d.mts +53 -0
  153. package/types/engine/dictionary-html.d.mts +8 -0
  154. package/types/engine/field-reference.d.mts +1 -1
  155. package/types/engine/heading-attributes.d.mts +20 -0
  156. package/types/engine/helpers.d.mts +3 -10
  157. package/types/engine/homepage.d.mts +11 -24
  158. package/types/engine/html-minify.d.mts +9 -0
  159. package/types/engine/index.d.mts +2 -1
  160. package/types/engine/language-terms.d.mts +24 -2
  161. package/types/engine/logographic.d.mts +45 -0
  162. package/types/engine/map-lexicon.d.mts +48 -8
  163. package/types/engine/map-places.d.mts +8 -0
  164. package/types/engine/markdown-expressions.d.mts +0 -2
  165. package/types/engine/metre-declaration.d.mts +39 -0
  166. package/types/engine/pdf-render.d.mts +6 -2
  167. package/types/engine/post-fields.d.mts +44 -0
  168. package/types/engine/preview-index.d.mts +72 -0
  169. package/types/engine/preview-source.d.mts +51 -0
  170. package/types/engine/script-emphasis-terms.d.mts +21 -0
  171. package/types/engine/script-emphasis.d.mts +84 -0
  172. package/types/engine/script-font-delivery.d.mts +4 -4
  173. package/types/engine/site-build.d.mts +71 -113
  174. package/types/engine/site-config.d.mts +14 -134
  175. package/types/engine/site-files.d.mts +73 -0
  176. package/types/engine/site-index.d.mts +11 -3
  177. package/types/engine/site-preview.d.mts +15 -19
  178. package/types/engine/site-render.d.mts +171 -0
  179. package/types/engine/site-root.d.mts +12 -4
  180. package/types/engine/site-search.d.mts +54 -0
  181. package/types/engine/site-serve.d.mts +44 -0
  182. package/types/engine/site-theme-banner.d.mts +51 -0
  183. package/types/engine/site-theme-urls.d.mts +60 -0
  184. package/types/engine/site-theme.d.mts +127 -0
  185. package/types/engine/text-maps.d.mts +17 -3
  186. package/types/engine/typographer.d.mts +11 -0
  187. package/types/engine/verse-metre.d.mts +131 -0
  188. package/types/engine/wikilink-syntax.d.mts +30 -48
  189. package/types/engine/wikilinks.d.mts +330 -14
  190. package/types/engine/word-forms.d.mts +3 -2
  191. package/types/manifest.d.mts +3 -4
  192. package/types/stage.d.mts +1 -2
  193. package/types/vendor/markdownlint.d.mts +8 -0
  194. package/vendor/markdownlint.mjs +20388 -0
  195. package/engine/web-wikilinks.mjs +0 -594
  196. package/hugo-theme/layouts/404.html +0 -85
  197. package/hugo-theme/layouts/_default/baseof.html +0 -67
  198. package/hugo-theme/layouts/_default/list.html +0 -139
  199. package/hugo-theme/layouts/_default/single.html +0 -4
  200. package/hugo-theme/layouts/blog/list.html +0 -54
  201. package/hugo-theme/layouts/blog-post/single.html +0 -36
  202. package/hugo-theme/layouts/index.html +0 -75
  203. package/hugo-theme/layouts/partials/banner-url.html +0 -141
  204. package/hugo-theme/layouts/partials/cdn-url.html +0 -36
  205. package/hugo-theme/layouts/partials/dictionary-lists.html +0 -58
  206. package/hugo-theme/layouts/partials/draft-notice.html +0 -41
  207. package/hugo-theme/layouts/partials/draft-state.html +0 -26
  208. package/hugo-theme/layouts/partials/header.html +0 -35
  209. package/hugo-theme/layouts/partials/hero-banner.html +0 -85
  210. package/hugo-theme/layouts/partials/infobox/entry.html +0 -18
  211. package/hugo-theme/layouts/partials/infobox/items.html +0 -26
  212. package/hugo-theme/layouts/partials/infobox/section.html +0 -56
  213. package/hugo-theme/layouts/partials/infobox/value.html +0 -43
  214. package/hugo-theme/layouts/partials/infobox.html +0 -57
  215. package/hugo-theme/layouts/partials/page-body.html +0 -152
  216. package/hugo-theme/layouts/partials/related.html +0 -138
  217. package/hugo-theme/layouts/partials/search.html +0 -84
  218. package/hugo-theme/layouts/partials/site-url.html +0 -32
  219. package/hugo-theme/layouts/partials/tags.html +0 -30
  220. package/hugo-theme/layouts/partials/toc.html +0 -28
  221. package/hugo-theme/layouts/partials/warn-missing-banner.html +0 -3
  222. package/hugo-theme/layouts/shortcodes/cartouche.html +0 -64
  223. package/hugo-theme/layouts/shortcodes/exturl.html +0 -12
  224. package/hugo-theme/layouts/shortcodes/glyph.html +0 -43
  225. package/hugo-theme/layouts/shortcodes/pagelist.html +0 -63
  226. package/hugo-theme/theme.toml +0 -11
  227. package/types/engine/web-wikilinks.d.mts +0 -107
  228. /package/{hugo-theme → site-theme}/data/banner-kinds.yaml +0 -0
  229. /package/{hugo-theme → site-theme}/static/css/sohl-icons.css +0 -0
  230. /package/{hugo-theme → site-theme}/static/fonts/game-icons-kb.woff2 +0 -0
  231. /package/{hugo-theme → site-theme}/static/img/banners/takheperu-hieroglyphs.svg +0 -0
  232. /package/{hugo-theme → site-theme}/static/img/cartouches/takheperu.svg +0 -0
  233. /package/{hugo-theme → site-theme}/static/js/inline-spoilers.js +0 -0
package/docs/commands.md CHANGED
@@ -198,8 +198,8 @@ directory's basename and determines the content package id by removing hyphens.
198
198
  The package kind defaults to `modules`; the license template defaults to
199
199
  `original`. `systems` and `modules` receive a journal pack and Foundry
200
200
  manifest configuration. `documentation` receives no Foundry pack or manifest.
201
- Every kind includes site and book targets. Hugo Extended and Typst are needed
202
- to render them locally; deployment needs separate hosting configuration.
201
+ Every kind includes site and book targets. Typst is needed to build the
202
+ book locally; deployment needs separate hosting configuration.
203
203
 
204
204
  **OPTIONS**
205
205
 
@@ -589,7 +589,7 @@ manifest carries the title Foundry requires for installation.
589
589
  reads to install a package, and a documentation package is not one —
590
590
  emitting `module.json` for it would advertise an installable package with no
591
591
  packs, no compatibility range and no id. Its site is built by
592
- `package-build site`, and its book by `package-build pdf`.
592
+ `package-build site build`, and its book by `package-build pdf`.
593
593
 
594
594
  **OPTIONS**
595
595
 
@@ -615,7 +615,7 @@ package-build: `packageKind: documentation` ships no Foundry package, so there i
615
615
 
616
616
  **SEE ALSO**
617
617
 
618
- `package-build site`, `package-build pdf`, `package-build bundle check`,
618
+ `package-build site build`, `package-build pdf`, `package-build bundle check`,
619
619
  [Configuration](configuration.md).
620
620
 
621
621
  ### `package-build site-root`
@@ -633,12 +633,12 @@ package-build site-root [--out <dir>]
633
633
 
634
634
  **DESCRIPTION**
635
635
 
636
- Hugo renders into `<out>/<contentPackage>/`, because the deployment carries the
636
+ The site is rendered into `<out>/<contentPackage>/`, because the deployment carries the
637
637
  `/<contentPackage>/` prefix physically and the routing layer is a
638
638
  path-preserving pass-through. The directory that is _uploaded_ is its parent,
639
639
  and Cloudflare Pages reads `_headers` and `_redirects` from there and nowhere
640
640
  else — a copy inside the prefix is published as a text file and never applied.
641
- Hugo owns everything under the prefix; this owns what sits beside it.
641
+ The render owns everything under the prefix; this owns what sits beside it.
642
642
 
643
643
  One file is written, `_headers`, and it says one thing: indexing is
644
644
  suppressed on every address a deployment answers on but nobody advertises —
@@ -705,7 +705,7 @@ Search is off (`site.search: false`), so no index was written.
705
705
 
706
706
  **SEE ALSO**
707
707
 
708
- `package-build site`, [Configuration](configuration.md).
708
+ `package-build site build`, [Configuration](configuration.md).
709
709
 
710
710
  `package-build lang <action>` asks three independent questions about this
711
711
  repository's localization, each blind to what the others see: `check`,
@@ -1653,7 +1653,7 @@ the staged LevelDB packs.
1653
1653
  `unpack` and `clean` alike. A package of that kind declares no packs by
1654
1654
  rule, so there is nothing to compile, unpack or clean; a run that exited 0
1655
1655
  having done nothing would be the quiet failure this toolchain refuses
1656
- everywhere else. Its site is built by `package-build site`, and its book by
1656
+ everywhere else. Its site is built by `package-build site build`, and its book by
1657
1657
  `package-build pdf`.
1658
1658
 
1659
1659
  **OPTIONS**
@@ -1676,7 +1676,7 @@ step to report against. 1 on any other thrown error. Otherwise 0.
1676
1676
 
1677
1677
  ```
1678
1678
  $ package-build package compile # packageKind: documentation
1679
- […] ERROR: `packageKind: documentation` compiles no compendium, so there is nothing to compile. Build its site with `package-build site` and its book with `package-build pdf`.
1679
+ […] ERROR: `packageKind: documentation` compiles no compendium, so there is nothing to compile. Build its site with `package-build site build` and its book with `package-build pdf`.
1680
1680
 
1681
1681
  $ package-build package compile
1682
1682
  […] Content tree: 4 note(s) at /private/tmp/pb-docs-demo-410/assets/content
@@ -1696,7 +1696,7 @@ Wrote welcome.json
1696
1696
 
1697
1697
  **SEE ALSO**
1698
1698
 
1699
- `package-build site`, `package-build pdf`, `package-build addresses diff`,
1699
+ `package-build site build`, `package-build pdf`, `package-build addresses diff`,
1700
1700
  [Diagnostics](diagnostics.md), [Configuration](configuration.md).
1701
1701
 
1702
1702
  ### `package-build deps fetch`
@@ -1773,7 +1773,7 @@ $ package-build deps fetch --from build/dist/module.zip
1773
1773
 
1774
1774
  **SEE ALSO**
1775
1775
 
1776
- `package-build site`, `package-build addresses diff`, [Configuration](configuration.md).
1776
+ `package-build site build`, `package-build addresses diff`, [Configuration](configuration.md).
1777
1777
 
1778
1778
  ### `package-build types check`
1779
1779
 
@@ -2531,93 +2531,175 @@ $ package-build content-index
2531
2531
 
2532
2532
  **SEE ALSO**
2533
2533
 
2534
- `package-build site`, `package-build pdf`, `package-build deps fetch`,
2534
+ `package-build site build`, `package-build pdf`, `package-build deps fetch`,
2535
2535
  [Configuration](configuration.md).
2536
2536
 
2537
- ### `package-build site`
2537
+ ### `package-build site build`
2538
2538
 
2539
2539
  **NAME**
2540
2540
 
2541
- Build the Hugo source tree from the content tree.
2541
+ `package-build site build` — render the content tree as a website, and index
2542
+ it for search.
2542
2543
 
2543
2544
  **SYNOPSIS**
2544
2545
 
2545
2546
  ```
2546
- package-build site
2547
+ package-build site build [--out <dir>]
2547
2548
  ```
2548
2549
 
2549
2550
  **DESCRIPTION**
2550
2551
 
2551
- Writes the whole Hugo source tree under `build/hugo/` — the sibling of
2552
- `package compile`: the same tree, rendered as pages instead of compiled
2553
- into packs. Everything a consumer would otherwise write for itself happens
2554
- here: the walk, address derivation, the address index, table expansion,
2555
- wikilink resolution, code-fence protection, the foreign-manifest merge, and
2556
- the Hugo configuration itself. The consumer's script then runs Hugo over the
2557
- tree — `hugo --source build/hugo` — and this command never does.
2558
-
2559
- **A site is its homepage and its pages.** The `type: homepage` note is
2560
- written as the mount's `_index.md`, so Hugo renders it at
2561
- `/<contentPackage>/`; every other note is one page at
2562
- `/<contentPackage>/<type>-<shortcode>/`. Nothing is generated between them —
2563
- no section directory, no listing, no tag page — and the generated
2564
- configuration disables the `section`, `taxonomy`, `term` and `RSS` kinds on
2565
- every site. An index of what the package publishes is a `doc` note carrying a
2566
- content table, authored where every other page is.
2567
-
2568
- Three things are written, and nothing outside `build/`:
2569
-
2570
- - `build/hugo/hugo.toml`, generated on every run from `package.json`
2571
- (`homepage`, `description`), `package-build.config.yaml`
2572
- (`authors`, `packageBuild.manifest.title`, `site.assets`, `site.notfound`,
2573
- `site.hugo`), the organisation's constants, the shared theme's own
2574
- location, and the navigation `deps fetch` cached. Every value's source is
2575
- listed under
2576
- [the generated Hugo configuration](configuration.md#the-generated-hugo-configuration).
2577
- - `build/hugo/content/`, the content mount — the homepage as its `_index.md`,
2578
- and the content tree's pages flat below `publish.address.prefix`. Wiped on
2579
- every run.
2580
- - `publishDir` pointing Hugo at `build/site/<contentPackage>/`, the
2581
- deployment root `package-build site-root` writes beside. Nothing Hugo
2582
- reads lands in what is published.
2583
-
2584
- The configuration's sources are read before the output tree is touched, so a
2585
- missing `homepage` or a cold navigation cache fails with the previous site
2586
- intact. Every gate is then checked and reported, and the run stops at the
2587
- first that fires, ordered so the report names the cause rather than its
2588
- symptoms — an unusable dependency manifest, reported after the links that
2589
- failed because of it, would otherwise read as a pile of broken notes. Reads
2590
- the content tree named by `paths.content`.
2552
+ Builds the site from the content tree: the sibling of `package compile`, the
2553
+ same tree rendered as pages instead of compiled into packs. Everything a
2554
+ consumer would otherwise write for itself happens here: the walk, address
2555
+ derivation, the address index, table expansion, wikilink resolution,
2556
+ code-fence protection and the foreign-manifest merge. Each note is expanded —
2557
+ links, tables, expressions, generated sections, maps — and rendered by the
2558
+ same renderer the Foundry journals and the editor preview use, then drawn by
2559
+ the site theme's layouts.
2560
+
2561
+ **A site is its homepage and its pages.** The `type: homepage` note is the
2562
+ package's front page at `/<contentPackage>/`; every other note is one page at
2563
+ `/<contentPackage>/<type>-<shortcode>/`. Nothing is generated between them
2564
+ beyond the listings `site.sections`, `site.feed` and `site.tags` ask for. An
2565
+ index of what the package publishes is a `doc` note carrying a content table,
2566
+ authored where every other page is.
2567
+ On the web, every heading carries an id the page's contents list links to,
2568
+ and straight quotes, `--`, `---` and `...` are set as typographic quotes,
2569
+ dashes and an ellipsis.
2570
+
2571
+ Written under `<out>/<contentPackage>/` — or under the path
2572
+ [`site.base`](configuration.md#where-a-site-is-served-and-what-it-lists)
2573
+ states, so a site served at `/` is written at `<out>/` itself — which is
2574
+ emptied first:
2575
+
2576
+ - one `index.html` per page — the homepage at the site's root, a note
2577
+ `site.sections` names at its section, every other note at
2578
+ `<type>-<shortcode>/` — each minified;
2579
+ - `404.html`, the page-not-found page `site.notfound` describes;
2580
+ - `sitemap.xml`, every page by its full address;
2581
+ - the theme's stylesheets, scripts, icon font and images, and `css/code.css`;
2582
+ - the script fonts the notes set text in, under
2583
+ `fonts/heroiclands/<version>/`;
2584
+ - with `site.feed`, the section's page listing its posts newest first, and its
2585
+ Atom feed at `<section>/atom.xml`;
2586
+ - with `site.tags`, a page for each tag at `tags/<tag>/` and the tag index at
2587
+ `tags/`;
2588
+ - with `site.sitemaps`, `sitemap-index.xml` and `robots.txt`, naming this
2589
+ site's sitemap and each package site's.
2590
+
2591
+ Without `site.tags` a tag is a label and links nowhere. A link of
2592
+ `site.notfound.links` to a page the site does not publish is left off the
2593
+ page-not-found page and reported as a warning located at that entry of
2594
+ `package-build.config.yaml`. A section of `site.sections` whose note is not in
2595
+ the content tree is an error located at its entry, and writes nothing.
2596
+
2597
+ Then, as `package-build site-root` does, `_headers` is written at `<out>/` and
2598
+ the pages are indexed for search into `pagefind/` inside the site's directory,
2599
+ unless `site.search` is `false`. With `site.mergeIndexes`, the search reads
2600
+ each package site's index beside its own. What a page tells the search is set
2601
+ out in the [site guide](guides/site.md#search).
2602
+
2603
+ The site's address, title and menu are read before the tree is, so a missing
2604
+ `homepage` or a cold navigation cache fails with the last good site in place.
2605
+ Every gate is then checked and reported, and the run stops at the first that
2606
+ fires, ordered so the report names the cause rather than its symptoms — an
2607
+ unusable dependency manifest, reported after the links that failed because of
2608
+ it, would otherwise read as a pile of broken notes. A gate that fires writes
2609
+ nothing. A note in error — a dead link, a table that cannot
2610
+ expand — is written as its page shows it, the finding is reported, and the
2611
+ run fails before the search index is built.
2591
2612
 
2592
2613
  **OPTIONS**
2593
2614
 
2594
- None.
2615
+ `--out <dir>` — the directory that is deployed. Defaults to `build/site`.
2595
2616
 
2596
2617
  **EXIT STATUS**
2597
2618
 
2598
2619
  1 if `package.json` declares no `homepage`, or one that does not end
2599
- `/<contentPackage>/`; if `packageBuild.manifest.title` is undeclared; or if
2600
- the navigation has not been fetched (`package-build deps fetch` fills the
2601
- cache and is named in the message). 1 if any gate fires — no homepage or two
2602
- competing for it, a frontmatter wikilink, an address that cannot be derived,
2603
- a stale or unaddressable dependency manifest, an address published twice, a
2604
- table that failed to expand, or a dead wikilink. Otherwise 0.
2620
+ `/<contentPackage>/`; if the site declares no title, description or `assets`
2621
+ host; or if the navigation has not been fetched (`package-build deps fetch`
2622
+ fills the cache and is named in the message). 1 if any gate fires — no
2623
+ homepage or two competing for it, a frontmatter wikilink, an address that
2624
+ cannot be derived, a stale or unaddressable dependency manifest, an address
2625
+ published twice, a table that failed to expand, or a dead wikilink. 1 on a
2626
+ script-font finding, and when the search index cannot be built. Otherwise 0,
2627
+ findings of severity `warning` included.
2605
2628
 
2606
2629
  **EXAMPLES**
2607
2630
 
2608
2631
  ```
2609
- $ package-build site
2610
- […] wrote 1 homepage(s) + 1 content page(s) to build/hugo/content
2611
- […] wrote build/hugo/hugo.toml
2632
+ $ package-build site build
2633
+ package-build.config.yaml:38:24: warning: the page-not-found links to /thalorna/polity/, which the site does not publish, so the link is left out
2634
+ […] wrote 4306 page(s) to build/site/thalorna
2635
+ […] indexed 4307 page(s) for search into build/site/thalorna/pagefind
2636
+ ```
2637
+
2638
+ **SEE ALSO**
2639
+
2640
+ `package-build site serve`, `package-build site-root`,
2641
+ `package-build deps fetch`, [the site guide](guides/site.md).
2642
+
2643
+ ### `package-build site serve`
2644
+
2645
+ **NAME**
2646
+
2647
+ `package-build site serve` — serve the website, and keep it current.
2648
+
2649
+ **SYNOPSIS**
2650
+
2651
+ ```
2652
+ package-build site serve [--port <port>] [--host <address>] [--out <dir>]
2653
+ ```
2654
+
2655
+ **DESCRIPTION**
2656
+
2657
+ Builds the site as `package-build site build` does, indexes it for search once,
2658
+ and serves the deployed directory over HTTP, so every page is at the address it
2659
+ is deployed at: `http://127.0.0.1:1313/<contentPackage>/`, or the path
2660
+ `site.base` states. An address the site does not publish is answered with its
2661
+ `404.html`. A search index `site.mergeIndexes` names is not served, since it is
2662
+ another site's; the site's own index is.
2663
+
2664
+ The content tree and the theme are watched. A change to a note's body or
2665
+ frontmatter writes that note's page again; a note whose name, type or
2666
+ shortcode changed, a new or removed note, a note holding an `sql` table, and
2667
+ any other file in the content tree build the whole site again; a change to the
2668
+ theme draws every page again. Every open page then reloads: each HTML page is
2669
+ sent with a script that listens for the server's `reload` event at
2670
+ `/__package-build/reload`, added as it is sent and never written to the site.
2671
+
2672
+ A page that changes only because another note changed — a table listing it,
2673
+ a link carrying its name — is written again by the next whole build. Findings
2674
+ are reported as `package-build site build` reports them, and the server keeps
2675
+ running. Interrupt it to stop.
2676
+
2677
+ **OPTIONS**
2678
+
2679
+ `--port` — the port to listen on, a number. Defaults to `1313`.
2680
+
2681
+ `--host` — the address to listen on. Defaults to `127.0.0.1`.
2682
+
2683
+ `--out <dir>` — the directory the site is written to. Defaults to
2684
+ `build/site`.
2685
+
2686
+ **EXIT STATUS**
2687
+
2688
+ 1 when the site's settings or its cached menu cannot be read. Otherwise 0 once
2689
+ interrupted.
2690
+
2691
+ **EXAMPLES**
2612
2692
 
2613
- $ package-build site
2614
- […] ERROR: the site navigation has not been fetched. Run `package-build deps fetch` first.
2693
+ ```
2694
+ $ package-build site serve
2695
+ […] built the site
2696
+ […] serving http://127.0.0.1:1313/thalorna/ — interrupt to stop
2697
+ […] wrote build/site/thalorna/place-vedyara/index.html
2615
2698
  ```
2616
2699
 
2617
2700
  **SEE ALSO**
2618
2701
 
2619
- `package-build deps fetch`, `package-build site-root`, `package-build package <action> [pack] [entry]`, `package-build pdf`, `package-build content-index [root]`,
2620
- [Diagnostics](diagnostics.md), [Configuration](configuration.md).
2702
+ `package-build site build`, [the site guide](guides/site.md).
2621
2703
 
2622
2704
  ### `package-build pdf`
2623
2705
 
@@ -2724,7 +2806,7 @@ $ package-build pdf --book-version 1.4.0 --no-compile
2724
2806
 
2725
2807
  **SEE ALSO**
2726
2808
 
2727
- `package-build site`, `package-build package <action> [pack] [entry]`,
2809
+ `package-build site build`, `package-build package <action> [pack] [entry]`,
2728
2810
  [Diagnostics](diagnostics.md), [Configuration](configuration.md).
2729
2811
 
2730
2812
  ### `package-build map`
@@ -3004,6 +3086,9 @@ with. With `--lang`, each word the language's lexicon states a native form for
3004
3086
  is written by it and every other word is spelled by the rows; without it, the
3005
3087
  rows alone apply. See
3006
3088
  [a map reads the dictionary first](reference/format-details.md#a-map-reads-the-dictionary-first).
3089
+ Under a [logographic map](reference/format-details.md#a-logographic-map) every
3090
+ word is written from the language's lexicon, by its own writing or its parts',
3091
+ and the rows write only the text between words.
3007
3092
  The text is the words given, joined by single spaces; `-` or no text reads it
3008
3093
  from standard input, less one trailing newline. Writes nothing.
3009
3094
 
@@ -3026,7 +3111,9 @@ from standard input, less one trailing newline. Writes nothing.
3026
3111
  language or the face names nothing, each reported as a finding: an unknown
3027
3112
  language at `languages` in the configuration, an unknown map or face at the
3028
3113
  content tree. 1, with the build's own message, if a capitalised word of the
3029
- passage has a native form the rows cannot capitalise. Otherwise 0.
3114
+ passage has a native form the rows cannot capitalise, or, under a logographic
3115
+ map, a word has no writing or stands for entries written differently.
3116
+ Otherwise 0.
3030
3117
 
3031
3118
  **EXAMPLES**
3032
3119
 
@@ -3045,6 +3132,17 @@ assets/content: error: `semoran` is not a map: a map is named by the `data.map.n
3045
3132
  The first run writes `zaron` by its exception; the second, with no `--lang`,
3046
3133
  spells it by the rows.
3047
3134
 
3135
+ Under the logographic `zethu`, with Khelathi's `lekhunet` built from `lekhau`
3136
+ and the affix `-unet`, the plural written by its own sign, and `zamlu` given no
3137
+ writing:
3138
+
3139
+ ```
3140
+ $ package-build transliterate zethu --lang khel --hex lekhunet halziim.
3141
+ U+1EA93 U+1EBC7 U+0020 U+1EABB U+1EBE1 U+1EBED
3142
+ $ package-build transliterate zethu --lang khel zamlu
3143
+ error: `zamlu` has no `zethu` writing in the `khel` lexicon, and its parts do not give one; state one, or write the word directly in signs
3144
+ ```
3145
+
3048
3146
  **SEE ALSO**
3049
3147
 
3050
3148
  `package-build lexicon <language>`, [Mapping notes](reference/format-details.md#mapping-notes).
@@ -3071,8 +3169,18 @@ word has one, else the rows' spelling, each exactly as
3071
3169
  by tabs, the word's `form`, its native form, `exception` or `rows`, its `class`
3072
3170
  and its `gloss`. Writes nothing.
3073
3171
 
3172
+ Under a [logographic map](reference/format-details.md#a-logographic-map) the
3173
+ native form is the word's writing, and the third column says where it comes
3174
+ from: `own` for a writing the word states, `parts` for one its `built` pieces
3175
+ give, or `none`, with an empty second column, for a word with no writing. A
3176
+ word whose form a run cannot write, because the form stands for entries
3177
+ written differently or one of its parts does, is marked `ambiguous`, and its
3178
+ second column is still that entry's own writing: the signs to write directly
3179
+ for that sense. Every word listed with a writing and not `ambiguous` is written
3180
+ so by the build and by `package-build transliterate`.
3181
+
3074
3182
  With `--derived`, the forms the language's own rules derive from those words
3075
- follow them: plurals, verb forms, replacing suffixes, agreeing forms and
3183
+ follow them: each word's declared `variants`, then plurals, verb forms, replacing suffixes, agreeing forms and
3076
3184
  participles, exactly the regular forms
3077
3185
  [the mapped-run word check](authoring/links-and-markup.md#a-mapped-runs-words)
3078
3186
  accepts. Each is listed once, case folded as the check compares it, and spelled
@@ -3086,12 +3194,12 @@ the lexicon's own words. A derived line carries its word's `class` and `gloss`.
3086
3194
  | ---------- | ------ | ------- | --------------------------------------------------- |
3087
3195
  | `language` | string | — | A declared language whose `note` names its lexicon. |
3088
3196
 
3089
- | Option | Type | Default | Description |
3090
- | ----------- | ------- | -------------------------- | ------------------------------------------------------------------------------------------------------ |
3091
- | `--map` | string | — | Required: the `data.map.name` of a mapping note. |
3092
- | `--font` | string | the map's one face, if one | The face; required when the map lists more than one. |
3093
- | `--derived` | boolean | `false` | Also list the forms the language's rules derive, each with the word it comes from. |
3094
- | `--json` | boolean | `false` | Print a JSON array of `{ form, native, exception, class, gloss }` instead; a derived form adds `from`. |
3197
+ | Option | Type | Default | Description |
3198
+ | ----------- | ------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
3199
+ | `--map` | string | — | Required: the `data.map.name` of a mapping note. |
3200
+ | `--font` | string | the map's one face, if one | The face; required when the map lists more than one. |
3201
+ | `--derived` | boolean | `false` | Also list the forms the language's rules derive, each with the word it comes from. |
3202
+ | `--json` | boolean | `false` | Print a JSON array of `{ form, native, exception, class, gloss }` instead; a derived form adds `from`. Under a logographic map `source` (`own`, `parts` or `none`) takes the place of `exception`, and an ambiguous word adds `ambiguous: true`. |
3095
3203
 
3096
3204
  **EXIT STATUS**
3097
3205
 
@@ -3112,6 +3220,10 @@ alatha <native form> rows pron he, that one alathos
3112
3220
  alathon <native form> rows pron he, that one alathos
3113
3221
  alathoi <native form> rows pron he, that one alathos
3114
3222
  alathai <native form> rows pron he, that one alathos
3223
+ $ package-build lexicon khel --map zethu | grep -P '\t(none|ambiguous)\t'
3224
+ nelgir <writing> ambiguous n a god
3225
+ Nelgir <writing> ambiguous stem god
3226
+ zamlu none n music
3115
3227
  ```
3116
3228
 
3117
3229
  **SEE ALSO**
@@ -3119,6 +3231,60 @@ alathai <native form> rows pron he, that one alathos
3119
3231
  `package-build transliterate <map> [text..]`,
3120
3232
  [A language's words](reference/format-details.md#a-languages-words).
3121
3233
 
3234
+ ### `package-build core`
3235
+
3236
+ **NAME**
3237
+
3238
+ List the core concepts each covering language has no word for.
3239
+
3240
+ **SYNOPSIS**
3241
+
3242
+ ```
3243
+ package-build core [--language <name>] [--json]
3244
+ ```
3245
+
3246
+ **DESCRIPTION**
3247
+
3248
+ Reads the content index and reports, for each language note that states
3249
+ `data.core: true`, the concepts of the package's
3250
+ [`data.concepts`](reference/format-details.md#the-core-vocabulary) list that no
3251
+ word of it serves. A word serves the concepts its `concept` names, and a language
3252
+ reads the words of its `data.family` chain as its own. The languages are listed
3253
+ by name; each block gives the number missing, then the missing concepts under
3254
+ their groups in list order, each group with its count, each concept as its `id`
3255
+ and `gloss` separated by a tab. A language with no concept missing is reported as
3256
+ covering them all. Writes nothing.
3257
+
3258
+ A missing concept is a fact to work through, never a finding, so the report does
3259
+ not change the exit status.
3260
+
3261
+ **OPTIONS**
3262
+
3263
+ | Option | Type | Default | Description |
3264
+ | ------------ | ------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3265
+ | `--language` | string | — | Report this language alone, by its name, its shortcode or its reference, whether or not it states `data.core`. |
3266
+ | `--json` | boolean | `false` | Print `{ concepts, languages }` instead, each language `{ name, language, core, total, covered, missing }` and each missing group `{ group, count, total, concepts }`. |
3267
+
3268
+ **EXIT STATUS**
3269
+
3270
+ 1 if the content index could not be built for any note, no note states
3271
+ `data.concepts`, or `--language` names no language note, each reported as a
3272
+ finding. Otherwise 0.
3273
+
3274
+ **EXAMPLES**
3275
+
3276
+ ```
3277
+ $ package-build core --language vylarilng
3278
+ Vylari Language (skill-vylarilng): 1 of 4 core concepts have no word
3279
+ senses: 1 of 1
3280
+ see-verb to see
3281
+ ```
3282
+
3283
+ **SEE ALSO**
3284
+
3285
+ [The core vocabulary](reference/format-details.md#the-core-vocabulary),
3286
+ [Tying words to the core vocabulary](authoring/links-and-markup.md#tying-words-to-the-core-vocabulary).
3287
+
3122
3288
  ### `package-build addresses diff`
3123
3289
 
3124
3290
  **NAME**