@heroiclands/package-build 6.0.0 → 6.1.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 +184 -0
- package/CONTENT.md +207 -3
- package/bin/content-build.mjs +168 -1
- package/content-config.mjs +29 -7
- package/engine/address-diff.mjs +290 -0
- package/engine/content-lint.mjs +23 -2
- package/engine/frontmatter-lint.mjs +22 -0
- package/engine/homepage.mjs +206 -2
- package/engine/site-build.mjs +74 -19
- package/package.json +1 -1
- package/types/engine/address-diff.d.mts +108 -0
- package/types/engine/content-lint.d.mts +4 -1
- package/types/engine/homepage.d.mts +117 -0
- package/types/engine/site-build.d.mts +28 -3
|
@@ -50,9 +50,9 @@ export function collectTreePages(tree: object, ctx: object): {
|
|
|
50
50
|
* packages ship under is a property of the code path rather than of a
|
|
51
51
|
* configuration that happens to be empty (#55).
|
|
52
52
|
*
|
|
53
|
-
* Returned as a list rather than as the one note there should be
|
|
54
|
-
*
|
|
55
|
-
* found
|
|
53
|
+
* Returned as a list rather than as the one note there should be, because the
|
|
54
|
+
* count is what {@link checkHomepageCount} judges (#52) — this walk reports
|
|
55
|
+
* what it found, and {@link buildSite} decides whether that is one.
|
|
56
56
|
*
|
|
57
57
|
* @param {string} contentBase - Absolute path to the content tree.
|
|
58
58
|
* @param {object} ctx - `{ skipDirectories }`.
|
|
@@ -129,6 +129,31 @@ export function gatesFailed(gates: any): boolean;
|
|
|
129
129
|
* @returns {Map<string, object[]>} Package → the notes it may tabulate.
|
|
130
130
|
*/
|
|
131
131
|
export function tableUniverse(pages: object[]): Map<string, object[]>;
|
|
132
|
+
/**
|
|
133
|
+
* The front matter a section's landing states about itself.
|
|
134
|
+
*
|
|
135
|
+
* The section metadata a configuration resolved, ready to be written or merged
|
|
136
|
+
* onto a page. Two things happen here and nothing else does:
|
|
137
|
+
*
|
|
138
|
+
* - **`title` leads.** It is the one key every landing has carried since the
|
|
139
|
+
* first one, and a landing whose block opened with `banner:` would be a
|
|
140
|
+
* gratuitous diff on every consumer's tree.
|
|
141
|
+
* - **An absent value is left off**, not written as `undefined` — which is not
|
|
142
|
+
* a value YAML can carry, and would abort the serializer.
|
|
143
|
+
*
|
|
144
|
+
* Everything else the section declared is passed through. That is the point of
|
|
145
|
+
* the function: before #91 both writers transcribed `title` and `banner` by
|
|
146
|
+
* name, so the vocabulary lived in three places — the schema that admits a key
|
|
147
|
+
* and the two writers that copy it — and a key added to the schema alone
|
|
148
|
+
* validated cleanly and then reached no page. The *schema* is the bound worth
|
|
149
|
+
* keeping (see `normalizeSectionMeta`, which refuses a key it does not know and
|
|
150
|
+
* names it); a second, silent bound in the writers is not.
|
|
151
|
+
*
|
|
152
|
+
* @param {object} meta - A resolved `site.sections` / `site.readmeSections`
|
|
153
|
+
* entry.
|
|
154
|
+
* @returns {object} Its front matter, `title` first.
|
|
155
|
+
*/
|
|
156
|
+
export function sectionFrontmatter(meta: object): object;
|
|
132
157
|
/**
|
|
133
158
|
* The frontmatter a page publishes with.
|
|
134
159
|
*
|