@heroiclands/package-build 22.23.0 → 22.24.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.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/docs/authoring/assets.md +15 -0
- package/docs/commands.md +18 -19
- package/docs/configuration.md +2 -6
- package/docs/guides/module-project.md +2 -2
- package/docs/guides/site.md +41 -0
- package/docs/project-setup.md +4 -4
- package/docs/reference/theme-pages.md +496 -0
- package/engine/art-slots.mjs +2 -1
- package/engine/foreign-catalog.mjs +2 -1
- package/engine/helpers.mjs +5 -3
- package/engine/site-config.mjs +19 -24
- package/hugo-theme/data/banners.yaml +69 -0
- package/hugo-theme/layouts/404.html +85 -0
- package/hugo-theme/layouts/_default/baseof.html +64 -0
- package/hugo-theme/layouts/_default/list.html +139 -0
- package/hugo-theme/layouts/_default/single.html +4 -0
- package/hugo-theme/layouts/blog/list.html +54 -0
- package/hugo-theme/layouts/blog-post/single.html +36 -0
- package/hugo-theme/layouts/index.html +75 -0
- package/hugo-theme/layouts/partials/banner-url.html +117 -0
- package/hugo-theme/layouts/partials/cdn-url.html +36 -0
- package/hugo-theme/layouts/partials/draft-notice.html +41 -0
- package/hugo-theme/layouts/partials/draft-state.html +26 -0
- package/hugo-theme/layouts/partials/footer.html +29 -0
- package/hugo-theme/layouts/partials/header.html +35 -0
- package/hugo-theme/layouts/partials/hero-banner.html +86 -0
- package/hugo-theme/layouts/partials/holdings/entry.html +21 -0
- package/hugo-theme/layouts/partials/holdings/kind-groups.html +71 -0
- package/hugo-theme/layouts/partials/holdings.html +61 -0
- package/hugo-theme/layouts/partials/infobox/entry.html +15 -0
- package/hugo-theme/layouts/partials/infobox/items.html +26 -0
- package/hugo-theme/layouts/partials/infobox/section.html +56 -0
- package/hugo-theme/layouts/partials/infobox/value.html +43 -0
- package/hugo-theme/layouts/partials/infobox.html +57 -0
- package/hugo-theme/layouts/partials/page-body.html +154 -0
- package/hugo-theme/layouts/partials/place-map.html +9 -0
- package/hugo-theme/layouts/partials/related.html +121 -0
- package/hugo-theme/layouts/partials/search.html +84 -0
- package/hugo-theme/layouts/partials/site-url.html +32 -0
- package/hugo-theme/layouts/partials/tags.html +30 -0
- package/hugo-theme/layouts/partials/toc.html +28 -0
- package/hugo-theme/layouts/partials/warn-missing-banner.html +3 -0
- package/hugo-theme/layouts/shortcodes/cartouche.html +64 -0
- package/hugo-theme/layouts/shortcodes/exturl.html +12 -0
- package/hugo-theme/layouts/shortcodes/glyph.html +43 -0
- package/hugo-theme/layouts/shortcodes/pagelist.html +63 -0
- package/hugo-theme/static/css/sohl-icons.css +57 -0
- package/hugo-theme/static/css/style.css +2953 -0
- package/hugo-theme/static/fonts/game-icons-kb.woff2 +0 -0
- package/hugo-theme/static/img/banners/takheperu-hieroglyphs.svg +1 -0
- package/hugo-theme/static/img/cartouches/takheperu.svg +1 -0
- package/hugo-theme/theme.toml +11 -0
- package/package.json +2 -1
- package/types/engine/art-slots.d.mts +2 -1
- package/types/engine/helpers.d.mts +5 -3
- package/types/engine/site-config.d.mts +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @heroiclands/package-build
|
|
2
2
|
|
|
3
|
+
## 22.24.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
**Hero banners** — A page whose note names its own hero image shows that image, in place of the stock banner for its kind; a note naming none gets a band with no image.
|
|
8
|
+
|
|
9
|
+
**Figures** — A numbered figure, table, listing or map reads as one block, its number and caption set beneath it rather than running on as body text, and a passage set apart as an aside draws as a box.
|
|
10
|
+
|
|
11
|
+
**Pictures** — A portrait or an emblem draws at half the content column and a banner, plate or map at its full width, never wider than the size the picture was made at; a stated width still overrides the role's measure.
|
|
12
|
+
|
|
13
|
+
**Installing** — The shared Hugo theme arrives with this package, so a site declares this package alone and needs no separate theme dependency.
|
|
14
|
+
|
|
15
|
+
**Hero images** — The authoring guide states the three states of a note's hero image: a picture, a deliberate blank that declines one, and an absent key that takes the default for the note's type.
|
|
16
|
+
|
|
3
17
|
## 22.23.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ The documentation lives in the Markdown files in this repository. Start with [th
|
|
|
33
33
|
| Detailed format rules and examples | [Format details](docs/reference/format-details.md) |
|
|
34
34
|
| Compendium routing and document builds | [Packs](docs/guides/packs.md) |
|
|
35
35
|
| Website build and publication | [Site](docs/guides/site.md) |
|
|
36
|
+
| What the theme draws on a page | [Theme pages](docs/reference/theme-pages.md) |
|
|
36
37
|
| PDF book build | [Book](docs/guides/book.md) |
|
|
37
38
|
| Icon generation and use | [Icons](docs/guides/icons.md) |
|
|
38
39
|
| Reference pages and content indexes | [Reference pages](docs/guides/reference-pages.md) |
|
package/docs/authoring/assets.md
CHANGED
|
@@ -38,6 +38,21 @@ role: portrait
|
|
|
38
38
|
|
|
39
39
|
**A hero image is 1792×768.** `data.banner` fills one fixed strip wherever it is drawn, so every banner is cut to that size and a picture of any other size is a finding naming both sizes — resize the picture to match. That is the one size any art field requires. A map's `bgImage` sets its own scene's dimensions, so that asks nothing of a picture's dimensions either.
|
|
40
40
|
|
|
41
|
+
`data.banner` reads in one of three states:
|
|
42
|
+
|
|
43
|
+
| A note writes | The page draws |
|
|
44
|
+
| ------------------ | -------------------------------------------------- |
|
|
45
|
+
| an asset Address | that picture |
|
|
46
|
+
| a blank | no picture, on purpose, and no default replaces it |
|
|
47
|
+
| nothing, or `null` | a default picture chosen by the note's `type` |
|
|
48
|
+
|
|
49
|
+
Omitting the key does not mean "no hero image" — it means artwork chosen for
|
|
50
|
+
the author, which inverts the ordinary reading of an absent key. **A note
|
|
51
|
+
declines with a blank, not with `none`.** `none` parses as an ordinary asset
|
|
52
|
+
Address — a shortcode, not a keyword — and since nothing in the corpus
|
|
53
|
+
answers to it, the build drops the key outright and the page falls through to
|
|
54
|
+
its type's default: the opposite of a decline.
|
|
55
|
+
|
|
41
56
|
`role` is one of `portrait`, `emblem`, `banner`, `plate` or `map`, and belongs to the `image` type only — declaring it in a `provenance.yaml` under `assets/icons` is a finding, since an icon carries one nominal size per medium whatever the file holds. Leave the key out for an ordinary picture; there is no default role name, only its absence.
|
|
42
57
|
|
|
43
58
|
**A role decides how large a picture written in prose draws, when nothing else states a size.** Each medium maps a role to a maximum, and the drawn size is the smaller of that slot and what the file's own pixels support — see [what a role draws at](../reference/format-details.md#what-a-role-draws-at). A named `size=` beside the embed still overrides it outright; an icon draws at the medium's nominal icon size whatever role it might otherwise have had, because `role` never reaches an icon address at all.
|
package/docs/commands.md
CHANGED
|
@@ -885,8 +885,8 @@ Install it with `npm ci`, which resolves from the lockfile this just moved.
|
|
|
885
885
|
```
|
|
886
886
|
|
|
887
887
|
```
|
|
888
|
-
$ package-build bump @heroiclands/
|
|
889
|
-
@heroiclands/
|
|
888
|
+
$ package-build bump @heroiclands/package-build --check
|
|
889
|
+
@heroiclands/package-build 22.6.0 → 22.7.0
|
|
890
890
|
|
|
891
891
|
Run without --check to take it.
|
|
892
892
|
```
|
|
@@ -2310,9 +2310,9 @@ Three things are written, and nothing outside `build/`:
|
|
|
2310
2310
|
- `build/hugo/hugo.toml`, generated on every run from `package.json`
|
|
2311
2311
|
(`homepage`, `description`, `author`), `package-build.config.yaml`
|
|
2312
2312
|
(`packageBuild.manifest.title`, `site.assets`, `site.notfound`,
|
|
2313
|
-
`site.hugo`), the organisation's constants, the
|
|
2314
|
-
|
|
2315
|
-
|
|
2313
|
+
`site.hugo`), the organisation's constants, the shared theme's own
|
|
2314
|
+
location, and the navigation `deps fetch` cached. Every value's source is
|
|
2315
|
+
listed under
|
|
2316
2316
|
[the generated Hugo configuration](configuration.md#the-generated-hugo-configuration).
|
|
2317
2317
|
- `build/hugo/content/`, the content mount — the homepage as its `_index.md`,
|
|
2318
2318
|
and the content tree's pages flat below `publish.address.prefix`. Wiped on
|
|
@@ -2321,13 +2321,13 @@ Three things are written, and nothing outside `build/`:
|
|
|
2321
2321
|
deployment root `package-build site-root` writes beside. Nothing Hugo
|
|
2322
2322
|
reads lands in what is published.
|
|
2323
2323
|
|
|
2324
|
-
The configuration's sources are read before the output tree is touched, so
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2324
|
+
The configuration's sources are read before the output tree is touched, so a
|
|
2325
|
+
missing `homepage` or a cold navigation cache fails with the previous site
|
|
2326
|
+
intact. Every gate is then checked and reported, and the run stops at the
|
|
2327
|
+
first that fires, ordered so the report names the cause rather than its
|
|
2328
|
+
symptoms — an unusable dependency manifest, reported after the links that
|
|
2329
|
+
failed because of it, would otherwise read as a pile of broken notes. Reads
|
|
2330
|
+
the content tree named by `paths.content`.
|
|
2331
2331
|
|
|
2332
2332
|
**OPTIONS**
|
|
2333
2333
|
|
|
@@ -2336,13 +2336,12 @@ None.
|
|
|
2336
2336
|
**EXIT STATUS**
|
|
2337
2337
|
|
|
2338
2338
|
1 if `package.json` declares no `homepage`, or one that does not end
|
|
2339
|
-
`/<contentPackage>/`; if `packageBuild.manifest.title` is undeclared; if
|
|
2340
|
-
navigation has not been fetched (`package-build deps fetch` fills the
|
|
2341
|
-
and is named in the message)
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
failed to expand, or a dead wikilink. Otherwise 0.
|
|
2339
|
+
`/<contentPackage>/`; if `packageBuild.manifest.title` is undeclared; or if
|
|
2340
|
+
the navigation has not been fetched (`package-build deps fetch` fills the
|
|
2341
|
+
cache and is named in the message). 1 if any gate fires — no homepage or two
|
|
2342
|
+
competing for it, a frontmatter wikilink, an address that cannot be derived,
|
|
2343
|
+
a stale or unaddressable dependency manifest, an address published twice, a
|
|
2344
|
+
table that failed to expand, or a dead wikilink. Otherwise 0.
|
|
2346
2345
|
|
|
2347
2346
|
**EXAMPLES**
|
|
2348
2347
|
|
package/docs/configuration.md
CHANGED
|
@@ -1031,8 +1031,8 @@ in it has one source, and that source is where it is edited:
|
|
|
1031
1031
|
| `locale` | the organisation's locale, `en-us`, in `engine/site-config.mjs` |
|
|
1032
1032
|
| `publishDir` | `contentPackage`, under the deployment root `build/site` — written relative to `build/hugo/`, so `../site/<contentPackage>` |
|
|
1033
1033
|
| `contentDir` | the fixed content mount, `build/hugo/content` — written as `content` |
|
|
1034
|
-
| `themesDir` |
|
|
1035
|
-
| `theme` | the
|
|
1034
|
+
| `themesDir` | this package's own root, which holds the theme it ships, written relative to `build/hugo/` |
|
|
1035
|
+
| `theme` | the theme's directory inside this package, `hugo-theme` |
|
|
1036
1036
|
| `disableKinds` | the toolchain, which renders a site as its homepage and its pages: `["section", "taxonomy", "term", "RSS"]` on every site, whatever its notes carry |
|
|
1037
1037
|
| `taxonomies` | the toolchain — never written, because `taxonomy` and `term` are disabled kinds |
|
|
1038
1038
|
| `outputs` | the toolchain — never written, because every listing kind is disabled |
|
|
@@ -1049,10 +1049,6 @@ error naming the command that fills it:
|
|
|
1049
1049
|
|
|
1050
1050
|
> `the site navigation has not been fetched. Run `package-build deps fetch` first.`
|
|
1051
1051
|
|
|
1052
|
-
A missing theme names the package to install:
|
|
1053
|
-
|
|
1054
|
-
> `@heroiclands/hugo-theme is not installed anywhere above <rootDir> — add it to `devDependencies`and run`npm ci``
|
|
1055
|
-
|
|
1056
1052
|
The site needs a title from `site.title` or the package manifest:
|
|
1057
1053
|
|
|
1058
1054
|
> ``package-build config: declare `site.title` or `packageBuild.manifest.title` for the site's title.``
|
|
@@ -863,8 +863,8 @@ None of them is needed to build a package.
|
|
|
863
863
|
**A website.** Every package publishes one — at the least, the homepage note
|
|
864
864
|
from step 5 — at `https://www.heroiclands.org/<contentPackage>/`. Add that
|
|
865
865
|
address to `package.json` as `homepage`, with a `description` and an `author`
|
|
866
|
-
beside it
|
|
867
|
-
|
|
866
|
+
beside it, and add a `packageBuild.manifest.title`. The theme the site renders
|
|
867
|
+
through ships with this package, so nothing else is installed. Then `package-build deps fetch` caches the
|
|
868
868
|
organisation's navigation, and `package-build site` writes the whole Hugo
|
|
869
869
|
source tree under `build/hugo/` — the configuration generated from those
|
|
870
870
|
values, and the content mount — for `hugo --source build/hugo` to render
|
package/docs/guides/site.md
CHANGED
|
@@ -132,6 +132,47 @@ fenced example remains literal. `site.passOptions` supplies that named pass's
|
|
|
132
132
|
options. This is a package-specific extension point; keep the general note
|
|
133
133
|
format and link behavior in the [content format](../content-format.md).
|
|
134
134
|
|
|
135
|
+
## What an emitted page carries
|
|
136
|
+
|
|
137
|
+
A theme reads the front matter `package-build site` writes: the note's own
|
|
138
|
+
front matter, plus the values the build derives. Which is which matters,
|
|
139
|
+
because an authored value under a derived key is discarded.
|
|
140
|
+
|
|
141
|
+
The build always writes `title`, `slug`, `url`, `kbfolder`, `package` and
|
|
142
|
+
`infoboxes`. `title` is the note's name, `url` is the page's address, and
|
|
143
|
+
`slug` is that address's last segment. `package` names the package shipping the
|
|
144
|
+
note. `infoboxes` is assembled from the note's own fields, so no note authors
|
|
145
|
+
it and nothing in the note format accepts it.
|
|
146
|
+
|
|
147
|
+
The build writes `resolvedDates`, `related`, `contains`, `held_by`, `holdings`
|
|
148
|
+
and `map` only when it has something to write. A page with no links either way
|
|
149
|
+
carries no `related`, and a place with no drawing carries no `map`.
|
|
150
|
+
|
|
151
|
+
An authored `aliases`, `related`, `contains`, `held_by`, `holdings` or `map` is
|
|
152
|
+
dropped. Each states a fact about the whole tree rather than about one note, so
|
|
153
|
+
the build replaces whatever a note wrote.
|
|
154
|
+
|
|
155
|
+
Artwork addresses are rewritten in place under `data`. A page's `data.icon`,
|
|
156
|
+
`data.bgImage` and `data.banner` carry the URLs the site serves rather than the
|
|
157
|
+
addresses the note authored, and there are four cases to tell apart:
|
|
158
|
+
|
|
159
|
+
| The note writes | The page carries |
|
|
160
|
+
| ---------------------------- | ---------------- |
|
|
161
|
+
| an address something answers | the resolved URL |
|
|
162
|
+
| an address nothing answers | no key at all |
|
|
163
|
+
| `null` | `null` |
|
|
164
|
+
| `""` | `""` |
|
|
165
|
+
|
|
166
|
+
An address nothing answers is deleted rather than written through, so an absent
|
|
167
|
+
key is the ordinary case for a theme to render nothing against, and no page
|
|
168
|
+
reaches a reader carrying a broken image source. The two empties are distinct
|
|
169
|
+
and both survive: `null` is a note naming no art, where a default may apply,
|
|
170
|
+
and `""` is a note refusing art, where no default may replace it.
|
|
171
|
+
|
|
172
|
+
The build writes these keys; [what the theme draws](../reference/theme-pages.md)
|
|
173
|
+
describes the panel each one feeds — the infobox, the hero band, the holdings
|
|
174
|
+
and related cards, the place map, and search.
|
|
175
|
+
|
|
135
176
|
## Build and serve
|
|
136
177
|
|
|
137
178
|
```bash
|
package/docs/project-setup.md
CHANGED
|
@@ -309,10 +309,10 @@ the rendered pages for search into `build/site/<contentPackage>/pagefind/`;
|
|
|
309
309
|
and `serve:site` does the first and then `hugo server` for a live preview.
|
|
310
310
|
The repository carries no Hugo configuration of its own: `hugo.toml` is
|
|
311
311
|
generated on every run from `package.json`, `package-build.config.yaml`, the
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
on the developer's `PATH` and the runner's.
|
|
312
|
+
shared theme that ships with `@heroiclands/package-build`, and the navigation
|
|
313
|
+
`deps fetch` cached — a site declares this one package and needs nothing
|
|
314
|
+
further added for its theme. Hugo itself is a separate install — the
|
|
315
|
+
extended edition, on the developer's `PATH` and the runner's.
|
|
316
316
|
|
|
317
317
|
The site build reads the cached navigation, so `build:site` in a package with
|
|
318
318
|
no other dependency still runs `deps fetch` first:
|