@heroiclands/package-build 23.13.0 → 24.0.1

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