@heroiclands/package-build 23.10.0 → 23.12.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 +28 -0
- package/README.md +1 -0
- package/assets/preview/check-sanitizer.go +68 -0
- package/assets/preview/gitea-theme.js +36 -0
- package/assets/preview/gitea.ini +127 -0
- package/assets/styles/content-base.css +119 -16
- package/bin/content-commands.mjs +2 -2
- package/bin/package-build-preview.mjs +75 -0
- package/content-config.mjs +11 -0
- package/docs/api.md +131 -45
- package/docs/authoring/first-note.md +10 -0
- package/docs/authoring/frontmatter.md +1 -1
- package/docs/authoring/links-and-markup.md +111 -6
- package/docs/commands.md +46 -2
- package/docs/configuration.md +21 -4
- package/docs/content-format.md +4 -2
- package/docs/design.md +19 -0
- package/docs/guides/book.md +11 -0
- package/docs/guides/site.md +7 -0
- package/docs/reference/format-details.md +82 -27
- package/docs/reference/note-types.md +0 -1
- package/docs/reference/theme-pages.md +1 -1
- package/docs/source-preview.md +172 -0
- package/engine/anchors.mjs +36 -4
- package/engine/base-compiler.mjs +7 -8
- package/engine/being-age.mjs +19 -105
- package/engine/calendar-notes.mjs +3 -25
- package/engine/compile-corpus.mjs +2 -1
- package/engine/content-format.yaml +0 -1
- package/engine/content-index.mjs +9 -9
- package/engine/content-links.mjs +41 -18
- package/engine/content-spans.mjs +54 -7
- package/engine/current-date.mjs +37 -0
- package/engine/definition-list.mjs +58 -0
- package/engine/frontmatter-lint.mjs +7 -2
- package/engine/helpers.mjs +6 -2
- package/engine/index.mjs +2 -0
- package/engine/infobox.mjs +1 -5
- package/engine/note-vocabulary.mjs +2 -2
- package/engine/npc-generate.mjs +7 -6
- package/engine/pdf-render.mjs +36 -3
- package/engine/preview-current-date.mjs +60 -0
- package/engine/site-build.mjs +5 -5
- package/engine/site-index.mjs +28 -6
- package/engine/site-preview.mjs +641 -325
- package/engine/web-wikilinks.mjs +33 -12
- package/engine/wikilink-syntax.mjs +65 -8
- package/engine/wikilinks.mjs +29 -11
- package/hugo-theme/layouts/_default/list.html +1 -1
- package/hugo-theme/layouts/blog/list.html +1 -1
- package/hugo-theme/layouts/blog-post/single.html +1 -1
- package/hugo-theme/layouts/partials/dictionary-lists.html +53 -0
- package/hugo-theme/layouts/partials/footer.html +2 -0
- package/hugo-theme/layouts/partials/page-body.html +1 -1
- package/hugo-theme/static/css/style.css +39 -9
- package/hugo-theme/static/js/inline-spoilers.js +23 -0
- package/package.json +8 -2
- package/types/content-config.d.mts +8 -0
- package/types/engine/anchors.d.mts +2 -1
- package/types/engine/base-compiler.d.mts +1 -1
- package/types/engine/being-age.d.mts +10 -44
- package/types/engine/calendar-notes.d.mts +2 -6
- package/types/engine/compile-corpus.d.mts +2 -1
- package/types/engine/content-index.d.mts +3 -1
- package/types/engine/content-spans.d.mts +7 -1
- package/types/engine/current-date.d.mts +9 -0
- package/types/engine/definition-list.d.mts +8 -0
- package/types/engine/frontmatter-lint.d.mts +6 -2
- package/types/engine/index.d.mts +2 -0
- package/types/engine/npc-generate.d.mts +2 -2
- package/types/engine/preview-current-date.d.mts +8 -0
- package/types/engine/site-index.d.mts +5 -1
- package/types/engine/site-preview.d.mts +40 -33
- package/types/engine/wikilink-syntax.d.mts +40 -3
package/docs/api.md
CHANGED
|
@@ -744,23 +744,23 @@ The corpus registry anchors each calendar's year 1, day 1 to its canonical `data
|
|
|
744
744
|
|
|
745
745
|
A calendar is a `lore` note with `subType: calendar`, declaring the months it keeps, the weekdays it names, the seasons it marks and the eras it counts years in. How long the year is, how the day divides and how the moon moves are facts about the **world**, written on its `place` note and its moon's, and no calendar may restate them — which is why the months summing to the world's year is the only arithmetic a calendar note is held to. One definition is emitted per calendar, in array shape: Foundry core prunes the keys outside its schema, and Calendaria converts the arrays to its own keyed collections.
|
|
746
746
|
|
|
747
|
-
| Export | Signature | Returns
|
|
748
|
-
| --------------------------- | ----------------------------------------------------- |
|
|
749
|
-
| `CALENDAR_SUBTYPE` | `const CALENDAR_SUBTYPE` | —
|
|
750
|
-
| `INVARIANT_SUBTYPES` | `const INVARIANT_SUBTYPES` | —
|
|
751
|
-
| `CALENDAR_FIELDS` | `const CALENDAR_FIELDS` | —
|
|
752
|
-
| `CALENDAR_ENTRY_FIELDS` | `const CALENDAR_ENTRY_FIELDS` | —
|
|
753
|
-
| `CALENDAR_DATE_FORMAT_KEYS` | `const CALENDAR_DATE_FORMAT_KEYS` | —
|
|
754
|
-
| `CALENDAR_FORMAT_TOKENS` | `const CALENDAR_FORMAT_TOKENS` | —
|
|
755
|
-
| `INVARIANT_FIELDS` | `const INVARIANT_FIELDS` | —
|
|
756
|
-
| `checkCalendarNote` | `checkCalendarNote(note, opts)` | `object[]` — findings
|
|
757
|
-
| `checkCalendarDateFormats` | `checkCalendarDateFormats(note)` | `object[]` — findings
|
|
758
|
-
| `checkWorldFacts` | `checkWorldFacts(note, opts)` | `object[]` — findings
|
|
759
|
-
| `worldInvariants` | `worldInvariants(index)` | `{year,
|
|
760
|
-
| `quarterDays` | `quarterDays(daysPerYear)` | `number[]` — four days of the year
|
|
761
|
-
| `compileCalendar` | `compileCalendar({note, invariants, contentPackage})` | `object` — the definition
|
|
762
|
-
| `compileCalendars` | `compileCalendars(index, opts)` | `{calendars, invariants}`
|
|
763
|
-
| `calendariaEnvelope` | `calendariaEnvelope(definition, opts)` | `object` — the import envelope
|
|
747
|
+
| Export | Signature | Returns | Use it when |
|
|
748
|
+
| --------------------------- | ----------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------- |
|
|
749
|
+
| `CALENDAR_SUBTYPE` | `const CALENDAR_SUBTYPE` | — | naming the `lore` subType whose notes are calendars |
|
|
750
|
+
| `INVARIANT_SUBTYPES` | `const INVARIANT_SUBTYPES` | — | naming the `place` subTypes a world fact may be written on |
|
|
751
|
+
| `CALENDAR_FIELDS` | `const CALENDAR_FIELDS` | — | reading the closed list of what a calendar note may declare |
|
|
752
|
+
| `CALENDAR_ENTRY_FIELDS` | `const CALENDAR_ENTRY_FIELDS` | — | reading the keys one entry of each calendar list takes, as inner-key declarations |
|
|
753
|
+
| `CALENDAR_DATE_FORMAT_KEYS` | `const CALENDAR_DATE_FORMAT_KEYS` | — | reading the supported Calendaria display slots |
|
|
754
|
+
| `CALENDAR_FORMAT_TOKENS` | `const CALENDAR_FORMAT_TOKENS` | — | checking bare date tokens in a format string |
|
|
755
|
+
| `INVARIANT_FIELDS` | `const INVARIANT_FIELDS` | — | reading the closed list of what a body may declare about itself |
|
|
756
|
+
| `checkCalendarNote` | `checkCalendarNote(note, opts)` | `object[]` — findings | holding a `lore` note to the family and to the year the world keeps |
|
|
757
|
+
| `checkCalendarDateFormats` | `checkCalendarDateFormats(note)` | `object[]` — findings | checking named patterns and the readable default |
|
|
758
|
+
| `checkWorldFacts` | `checkWorldFacts(note, opts)` | `object[]` — findings | holding a `place` note's world facts to one body, one year and one moon |
|
|
759
|
+
| `worldInvariants` | `worldInvariants(index)` | `{year, moon, body, moonName, …}` | reading the year and moon a package's own notes state |
|
|
760
|
+
| `quarterDays` | `quarterDays(daysPerYear)` | `number[]` — four days of the year | asking which days the year turns on |
|
|
761
|
+
| `compileCalendar` | `compileCalendar({note, invariants, contentPackage})` | `object` — the definition | building the one object both a core consumer and Calendaria read |
|
|
762
|
+
| `compileCalendars` | `compileCalendars(index, opts)` | `{calendars, invariants}` | building every calendar a package declares, or none where it states no year |
|
|
763
|
+
| `calendariaEnvelope` | `calendariaEnvelope(definition, opts)` | `object` — the import envelope | wrapping a definition for a hand import through Calendaria's settings |
|
|
764
764
|
|
|
765
765
|
### `engine.calendarArtifacts`
|
|
766
766
|
|
|
@@ -776,18 +776,45 @@ identical bytes.
|
|
|
776
776
|
| ----------------------- | ---------------------------------------------------- | ------------------------------- | ---------------------------------------------------- |
|
|
777
777
|
| `emitCalendarArtifacts` | `emitCalendarArtifacts({config, calendariaVersion})` | `{directory, calendars, files}` | writing calendar files for a package's Foundry stage |
|
|
778
778
|
|
|
779
|
+
### `engine.definitionList`
|
|
780
|
+
|
|
781
|
+
HTML definition lists use semantic dictionary rows. The plugin groups each term
|
|
782
|
+
and all its definitions inside one `div` under `dl.dictionary`, preserving
|
|
783
|
+
nested blocks, inline formatting and document footnotes. Register it after
|
|
784
|
+
`markdown-it-deflist`.
|
|
785
|
+
|
|
786
|
+
| Export | Signature | Returns | Use it when |
|
|
787
|
+
| ---------------------- | -------------------------- | ------- | --------------------------------------------------------------- |
|
|
788
|
+
| `dictionaryListPlugin` | `dictionaryListPlugin(md)` | `void` | Giving an HTML Markdown parser the shared dictionary structure. |
|
|
789
|
+
|
|
790
|
+
The website groups Goldmark's final HTML through the `dictionary-lists.html`
|
|
791
|
+
partial, retaining its headings, TOC and footnotes. Shared content styles use a
|
|
792
|
+
150px hanging indent, a `.75em` term gap and `.5em` space between entries. At
|
|
793
|
+
viewport widths of 600px or less the indent is 100px. Terms are bold and stay on
|
|
794
|
+
one line. A long term pushes the first definition farther right; continuation
|
|
795
|
+
lines return to the common indent. Profile infobox grids keep their own layout.
|
|
796
|
+
|
|
797
|
+
### `engine.currentDate`
|
|
798
|
+
|
|
799
|
+
The shared current-date setting is a neutral string and requires no calendar or
|
|
800
|
+
configuration loading. Undefined selects the default; invalid explicit values
|
|
801
|
+
throw `TypeError`. Day digits remain exactly as authored.
|
|
802
|
+
|
|
803
|
+
| Export | Signature | Returns | Use it when |
|
|
804
|
+
| ---------------------- | ------------------------------ | --------- | ----------------------------------------------- |
|
|
805
|
+
| `DEFAULT_CURRENT_DATE` | Constant | `"720.1"` | Selecting the setting-wide default. |
|
|
806
|
+
| `normalizeCurrentDate` | `normalizeCurrentDate(value?)` | `string` | Validating a configuration or adapter override. |
|
|
807
|
+
|
|
779
808
|
### `engine.beingAge`
|
|
780
809
|
|
|
781
|
-
The middle state of a being's `age`: absent beside a dated `born`, it is computed against the
|
|
810
|
+
The middle state of a being's `age`: absent beside a dated `born`, it is computed against the configured `currentDate` (default `"720.1"`) — the two dates compared, not the two years subtracted, so a birthday later in the year than the present counts one less. `applyComputedBeingAge` fills it in on the frontmatter object a pass already holds, never on the note; `checkBeingAge` is `being`'s `NOTE_VOCABULARY` check, raising a warning where an authored `age` disagrees with what a dated `born` computes to. An estimate's `~` is read the way a date's is: the authored string stays verbatim, and `ageYears` carries the magnitude beside it.
|
|
782
811
|
|
|
783
|
-
| Export
|
|
784
|
-
|
|
|
785
|
-
| `computeAge`
|
|
786
|
-
| `parseAgeMagnitude`
|
|
787
|
-
| `applyComputedBeingAge`
|
|
788
|
-
| `
|
|
789
|
-
| `presentAmongFrontmatters` | `presentAmongFrontmatters(frontmatters)` | the present, or `null` | reading the declared present from a batch of raw frontmatter objects |
|
|
790
|
-
| `checkBeingAge` | `checkBeingAge(note, opts)` | `object[]` — findings | holding a being's authored `age` to what `born` and the present compute |
|
|
812
|
+
| Export | Signature | Returns | Use it when |
|
|
813
|
+
| ----------------------- | --------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------- |
|
|
814
|
+
| `computeAge` | `computeAge(bornRaw, presentRaw)` | `number \| null` | reading the age two dates imply, in whole years |
|
|
815
|
+
| `parseAgeMagnitude` | `parseAgeMagnitude(raw)` | `{approximate, value} \| null` | reading an authored `age`'s `~` mark and its magnitude |
|
|
816
|
+
| `applyComputedBeingAge` | `applyComputedBeingAge(fm, presentRaw)` | `void` — mutates `fm.data` | filling in a being's computed `age`, or the `ageYears` beside an estimate |
|
|
817
|
+
| `checkBeingAge` | `checkBeingAge(note, { index, currentDate })` | `object[]` — findings | holding a being's authored `age` to what `born` and the present compute |
|
|
791
818
|
|
|
792
819
|
### `engine.contentAddress`
|
|
793
820
|
|
|
@@ -1290,30 +1317,33 @@ index for checking page links.
|
|
|
1290
1317
|
|
|
1291
1318
|
### `engine.sitePreview`
|
|
1292
1319
|
|
|
1293
|
-
`
|
|
1320
|
+
`renderPreview(text, { dark = false, infobox = true, file = "", currentDate = "720.1" })` renders the current Markdown buffer directly to HTML. Frontmatter is optional. It needs no package configuration, saved note, content tree, dependency cache, database or Pandoc installation. The result is `{ ok, html, frontmatter, findings }`; `file` only labels diagnostics. Malformed frontmatter produces a warning and remains visible without preventing a preview update.
|
|
1294
1321
|
|
|
1295
|
-
| Export
|
|
1296
|
-
|
|
|
1297
|
-
| `
|
|
1322
|
+
| Export | Signature | Returns | Use it when |
|
|
1323
|
+
| ------------------------ | ------------------------------- | ------------------------------------- | ---------------------------------------------------------------------- |
|
|
1324
|
+
| `renderPreview` | `renderPreview(text, options?)` | `{ ok, html, frontmatter, findings }` | An editor or external renderer needs a preview from one buffer. |
|
|
1325
|
+
| `previewStyles` | `previewStyles()` | CSS string | A host needs the shared, scoped light and dark palettes. |
|
|
1326
|
+
| `readPreviewCurrentDate` | `readPreviewCurrentDate(root)` | `Promise<string>` | Opting into the nearest project's validated root current-date setting. |
|
|
1327
|
+
| `PREVIEW_HELPERS` | Constant | Helper dependency policy | Checking preview coverage when adding an expression helper. |
|
|
1298
1328
|
|
|
1299
|
-
The
|
|
1329
|
+
The returned HTML includes an `.hl-preview` wrapper with exactly one explicit mode class, `.hl-preview-light` or `.hl-preview-dark`. Include `previewStyles()` once in the host document. The stylesheet colors only the preview container, including its backgrounds, source tokens, alerts and optional local infobox. Set `dark` from the host's selected theme; browser preference does not override it.
|
|
1300
1330
|
|
|
1301
1331
|
```js
|
|
1302
|
-
import {
|
|
1332
|
+
import { renderPreview, previewStyles } from "@heroiclands/package-build/engine/site-preview";
|
|
1303
1333
|
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
if (result.ok) {
|
|
1308
|
-
// Convert result.markdown and result.frontmatter to the editor's HTML preview.
|
|
1309
|
-
} else {
|
|
1310
|
-
showDiagnostics(result.findings);
|
|
1311
|
-
}
|
|
1312
|
-
} finally {
|
|
1313
|
-
await preview.close();
|
|
1314
|
-
}
|
|
1334
|
+
const result = renderPreview(currentBufferText, { dark: true });
|
|
1335
|
+
// Include previewStyles() in a stylesheet and result.html in the preview document.
|
|
1336
|
+
showDiagnostics(result.findings);
|
|
1315
1337
|
```
|
|
1316
1338
|
|
|
1339
|
+
Ordinary Markdown, definition lists, footnotes, alert boxes, poetry, captions, local figures and container blocks render locally. Alerts reuse the four shared icons and titles, accept custom titles and nested alerts, and have opaque tinted backgrounds in both modes. Definition terms are bold; definitions retain ordinary Markdown styling. Wikilinks and image embeds retain their entire authored source: blue opening markers (including all of `
|
|
1514
|
+
for surface presentation.
|
|
1515
|
+
|
|
1477
1516
|
### `engine.contentTables`
|
|
1478
1517
|
|
|
1479
1518
|
Prepared SQL content tables are expanded into Markdown before link resolution.
|
|
@@ -1602,8 +1641,8 @@ What a `[[…]]` **is**, before anything decides where it points. One authored l
|
|
|
1602
1641
|
| Export | Signature | Returns | Use it when |
|
|
1603
1642
|
| -------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
1604
1643
|
| `WIKILINK` | `const WIKILINK` | — | A wikilink, as authored. |
|
|
1605
|
-
| `parseWikilink` | `function parseWikilink(rawInner)`
|
|
1606
|
-
| `readWikilink` | `function readWikilink(inner, context)`
|
|
1644
|
+
| `parseWikilink` | `function parseWikilink(rawInner, literal?)` | {ParsedWikilink} The parts, each trimmed. | Split a wikilink's interior into its parts. |
|
|
1645
|
+
| `readWikilink` | `function readWikilink(inner, context, literal?)` | Typed target or literal target with diagnostic source. | Parse a link target using complete builder Address context. |
|
|
1607
1646
|
| `authoredLabel` | `authoredLabel({ display })` | {string\|null} The label, or `null` when there is none to show. | The label an author actually supplied, or `null` when they supplied none. |
|
|
1608
1647
|
| `unlabelledLinkMessage` | `function unlabelledLinkMessage(target)` | {string} The message, unpunctuated at the end as a finding is. | What an author writing an unlabelled link is told, in one place. |
|
|
1609
1648
|
| `LINK_FINDING_REASONS` | `const LINK_FINDING_REASONS` | — | Every way a link can fail, named once for all three resolvers. |
|
|
@@ -1614,6 +1653,15 @@ What a `[[…]]` **is**, before anything decides where it points. One authored l
|
|
|
1614
1653
|
| `isEventAnchor` | `isEventAnchor(hit, anchor)` | {boolean} Whether it is an event. | Whether the anchor a wikilink names is one of its target's events, which a wikilink may not name. |
|
|
1615
1654
|
| `isSamePage` | `isSamePage({ target, anchor })` | {boolean} True when the link is same-page. | Whether a parsed link addresses a section of the page it is written on. |
|
|
1616
1655
|
|
|
1656
|
+
`parseWikilink` and `readWikilink` accept the complete matched `literal` to
|
|
1657
|
+
read a trailing attribute block into `attributes`; its `classes` include the
|
|
1658
|
+
explicit `.show` override.
|
|
1659
|
+
|
|
1660
|
+
| Export | Signature | Returns | Use it when |
|
|
1661
|
+
| ------------------- | ------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------- |
|
|
1662
|
+
| `secretDestination` | `secretDestination(destination, anchor?)` | `boolean` | Read the resolved note's GM audience or the referenced anchor's secret metadata. |
|
|
1663
|
+
| `presentWikilink` | `presentWikilink(reference, parsed, destination)` | `string` | Wrap a rendered reference as an inline spoiler unless the parsed link explicitly carries `.show`. |
|
|
1664
|
+
|
|
1617
1665
|
### `engine.siteIndex`
|
|
1618
1666
|
|
|
1619
1667
|
**The address index a site build resolves its wikilinks against.**
|
|
@@ -1981,6 +2029,29 @@ Where HM3 records the template priority — one statement (`data.templatePriorit
|
|
|
1981
2029
|
| `HM3_DEFAULT_ITEM_ART` | `const HM3_DEFAULT_ITEM_ART` | — | reading the full map of default item artwork keyed by **note** type (not document subtype) for HM3 items |
|
|
1982
2030
|
| `hm3DefaultItemArt` | `hm3DefaultItemArt(type)` | `string` — the default image path | getting the default art path for an HM3 item's note type, throwing when the type is unknown |
|
|
1983
2031
|
|
|
2032
|
+
## `./preview`
|
|
2033
|
+
|
|
2034
|
+
Import the buffer-only renderer directly without loading the build pipeline:
|
|
2035
|
+
|
|
2036
|
+
```js
|
|
2037
|
+
import { renderPreview, previewStyles } from "@heroiclands/package-build/preview";
|
|
2038
|
+
|
|
2039
|
+
const { html, findings } = renderPreview(currentBufferText, { dark: true });
|
|
2040
|
+
const css = previewStyles();
|
|
2041
|
+
```
|
|
2042
|
+
|
|
2043
|
+
| Export | Signature | Returns | Use it when |
|
|
2044
|
+
| ------------------------ | ------------------------------- | ------------------------------------- | ---------------------------------------------------------------------- |
|
|
2045
|
+
| `renderPreview` | `renderPreview(text, options?)` | `{ ok, html, frontmatter, findings }` | Rendering one Markdown buffer without configuration or an index. |
|
|
2046
|
+
| `previewStyles` | `previewStyles()` | CSS string | Installing both scoped palettes in an editor or external host. |
|
|
2047
|
+
| `readPreviewCurrentDate` | `readPreviewCurrentDate(root)` | `Promise<string>` | Opting into the nearest project's validated root current-date setting. |
|
|
2048
|
+
| `PREVIEW_HELPERS` | Constant | Helper dependency policy | Checking coverage for every registered expression helper. |
|
|
2049
|
+
|
|
2050
|
+
These are the same exports as [`engine.sitePreview`](#enginesitepreview), with
|
|
2051
|
+
the same explicit palette, local infobox, source-preservation and diagnostics
|
|
2052
|
+
contract. See [Source preview](source-preview.md) for the standalone command and
|
|
2053
|
+
Gitea installation.
|
|
2054
|
+
|
|
1984
2055
|
## `./content-config`
|
|
1985
2056
|
|
|
1986
2057
|
The per-repository configuration contract: what `package-build.config.yaml` (or an `.mjs` config calling `defineConfig` directly) must satisfy. `defineConfig` validates and normalizes the whole thing, returning a deeply frozen copy, and performs no I/O — `engine.packConfig` is what locates and reads a repository's file, deriving the three fields absent from authored YAML (`rootDir`, `stats.systemVersion`, the resolved `itemBuilders` table). See `docs/configuration.md` for the full key-by-key reference; this section covers the module's own exported shape.
|
|
@@ -2371,6 +2442,21 @@ The engine wildcard subpath also exposes the body parsers below. Their figure ex
|
|
|
2371
2442
|
| `engine/content-poetry.mjs` | `verseLines`, `poetryStanzas`, `inlineVerse`, `poetryMarkdown`, `scanPoetry`, `renderPoetry` | Read `poetry` code fences, validate authored metadata and tabs, and preserve relative indent levels and stanzas. |
|
|
2372
2443
|
| `engine/content-spans.mjs` | `spanMarkdownPlugin`, `scanSpans`, `renderSpans` | Parse bracket spans after recognized links. The scanner returns spans, the exact `.name` inventory and located errors, retaining visible text and attribute positions; rendering preserves inline Markdown and permitted attributes. |
|
|
2373
2444
|
|
|
2445
|
+
Inline `.secret` spans preserve their inline content, name classes and
|
|
2446
|
+
attributes. Site rendering uses a separate show/hide button and content span,
|
|
2447
|
+
so a link inside the content does not become a nested control. Foundry emits a
|
|
2448
|
+
focusable inline spoiler: scoped content CSS redacts its text and descendants
|
|
2449
|
+
until pointer hover or keyboard focus reveals them. Its focus outline and
|
|
2450
|
+
accessible cue identify the reveal interaction. Native Foundry secret sections
|
|
2451
|
+
keep their separate controls. Book rendering discards inline `.secret` classes
|
|
2452
|
+
and prints their content normally, retaining emphasis, links, anchors and `.name`
|
|
2453
|
+
bold styling. Book secret sections and fences retain their visible labelled
|
|
2454
|
+
boxes. The span parser's opaque source tokens retain a `secret` boolean from
|
|
2455
|
+
their parsed classes for preview presentation.
|
|
2456
|
+
`collectAnchors` includes `secret: true` on secret anchors for destination
|
|
2457
|
+
presentation. Block and heading secrecy retain their separate scope and
|
|
2458
|
+
Foundry permission handling.
|
|
2459
|
+
|
|
2374
2460
|
`scanFigures` retains `line` (1-based caption line), `bodyStart`/`bodyEnd` (0-based, exclusive-end target range), and `close` (last consumed target line), plus caption attributes, kind, label and number. Unnumbered captions have an empty label and consume no number. `collectAnchors` discovers heading, caption, div, poem and span identifiers; `markupAnchorFindings(body)` reports collisions involving non-page identifiers; Foundry maps non-page anchors to the actual containing page UUID. An unnumbered `ref` requires `form="title"` or `form="full"`.
|
|
2375
2461
|
|
|
2376
2462
|
`engine/markup-validation.mjs` provides shared syntax validation:
|
|
@@ -41,6 +41,16 @@ For optional writing suggestions, run `npx package-build prose lint assets/conte
|
|
|
41
41
|
|
|
42
42
|
The full Address is `<package>-note-lore-harbor`; `<package>` comes from `contentPackage` in `package-build.config.yaml`. In another note, `[[lore-harbor|Harbor]]` links to it. `[[lore-harbor|]]` asks the renderer to use the target's current name. The pipe is required.
|
|
43
43
|
|
|
44
|
+
Use another subject's full canonical name at its first prose mention, then
|
|
45
|
+
plain text for later mentions and aliases. Keep a note's own subject in plain
|
|
46
|
+
text. Link indexed subjects even when they are private: the destination's
|
|
47
|
+
audience automatically makes the whole reference a spoiler. Add `.show` only
|
|
48
|
+
to intentionally reveal the reference; it grants no access to the destination.
|
|
49
|
+
For an unwritten subject, use a typed span such as
|
|
50
|
+
`[Aldric Venn]{.name data-type="being/npc"}`. The
|
|
51
|
+
[links and markup guide](links-and-markup.md#marking-names-in-prose) covers
|
|
52
|
+
these rules and separate `[text]{.secret}` spoilers.
|
|
53
|
+
|
|
44
54
|
## Grow the note only when needed
|
|
45
55
|
|
|
46
56
|
Add `description` for a short page summary, `tags: [draft]` to mark unfinished prose, or `data` for fields the note's type permits. A system block such as `sohl:` or `hm3:` adds mechanics and can produce a Foundry Actor or Item. It does not replace the shared prose or make another JournalEntry. [Frontmatter](frontmatter.md) explains the allowed keys, and the [note-type reference](../reference/note-types.md) lists every type-specific field.
|
|
@@ -25,7 +25,7 @@ data: {}
|
|
|
25
25
|
|
|
26
26
|
`description` is the short page summary. `tags` hold draft state and descriptive labels. The note type's classification belongs in `subType` where it is declared. `data` holds facts about the subject shared by systems. A YAML comment is the place for an author-only note: commented values remain valid YAML but do not enter the content index or generated documents.
|
|
27
27
|
|
|
28
|
-
Use `tags: [gm]` for a note intended only for the GM. It is absent from the public website and book. Foundry includes it only when its document routes to a pack with `private: true`. A note with `gm` that also creates a prose JournalEntry needs a private JournalEntry pack.
|
|
28
|
+
Use `tags: [gm]` for a note intended only for the GM. It is absent from the public website and book. Foundry includes it only when its document routes to a pack with `private: true`. A note with `gm` that also creates a prose JournalEntry needs a private JournalEntry pack. Any note can reference a GM note with an ordinary wikilink. The whole reference is automatically a spoiler; `.show` reveals only that reference, without changing the target's audience or permissions. See [references to secret subjects](links-and-markup.md#references-to-secret-subjects).
|
|
29
29
|
|
|
30
30
|
The formatter keeps a collection on one line when the full line is under 100 characters. Longer collections use full YAML block form. Run `package-build format --write` to apply key order and collection formatting.
|
|
31
31
|
|
|
@@ -23,10 +23,49 @@ A link to a note tagged `draft` retains its target and carries a visible draft c
|
|
|
23
23
|
|
|
24
24
|
An HTML comment is an aside to whoever reads the note next, and no surface shows one — the packs and the website emit it into the HTML, where it stays a comment, and a book leaves it out. Write a `markdownlint` pragma or a note about a quoted passage freely. A comment inside a fence or a code span is an example and is printed as written, and a comment that is never closed is an error.
|
|
25
25
|
|
|
26
|
+
## References to secret subjects
|
|
27
|
+
|
|
28
|
+
Use an ordinary wikilink for an indexed subject, including a GM-only note:
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
[[doc-divineactn|The Truth of Divine Action]]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The renderer reads the destination's audience and conceals the entire reference,
|
|
35
|
+
including its label, as a spoiler. Authors do not repeat that audience at each
|
|
36
|
+
reference. A reference to a public subject stays visible. A link to an anchor inside secret content
|
|
37
|
+
conceals its reference too, including a same-note `[[#anchor|label]]`.
|
|
38
|
+
Linking to the public note as a whole does not inherit a section's secrecy.
|
|
39
|
+
|
|
40
|
+
| Surface | Reference to a secret destination |
|
|
41
|
+
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| Website | An inline show/hide spoiler conceals its label. An omitted GM-only destination produces text without an unusable link. A published secret heading can still be linked. |
|
|
43
|
+
| Foundry | A CSS-redacted inline spoiler reveals the reference on hover or keyboard focus. Private pack and page permissions govern whether its destination can be opened. |
|
|
44
|
+
| Book | The reference prints normally, preserving emphasis and name styling. An omitted GM-only destination produces text without a link. |
|
|
45
|
+
|
|
46
|
+
`.show` removes automatic spoiler presentation on the website and in Foundry.
|
|
47
|
+
Book references already print normally. Where the target is unavailable the
|
|
48
|
+
reference still produces text without a link.
|
|
49
|
+
|
|
50
|
+
To intentionally reveal this reference, add `.show` immediately after the link:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
[[doc-divineactn|The Truth of Divine Action]]{.show}
|
|
54
|
+
[[doc-magictruth|The Truth of Magic]]{.show}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`.show` reveals only this reference. It does not publish the destination, change
|
|
58
|
+
its audience or grant Foundry access. It is redundant for a public target.
|
|
59
|
+
Use `[text]{.secret}` when the text itself is a spoiler, independently of any
|
|
60
|
+
destination; see [inline spoilers](#inline-spoilers).
|
|
61
|
+
|
|
26
62
|
## Marking names in prose
|
|
27
63
|
|
|
28
64
|
Use `[Name]{.name}` for a name that has no indexed note. Link a name that has
|
|
29
|
-
one; an empty link label uses the indexed full
|
|
65
|
+
one, including a private subject; an empty link label uses the indexed full
|
|
66
|
+
name. Introduce another subject with its full canonical name at its first prose
|
|
67
|
+
use. Keep the note's own subject in plain text, and use plain text for later
|
|
68
|
+
mentions and aliases. Bold is emphasis.
|
|
30
69
|
Plain text, including capitalized words, is not searched for names.
|
|
31
70
|
|
|
32
71
|
```markdown
|
|
@@ -39,7 +78,7 @@ creating a placeholder note:
|
|
|
39
78
|
|
|
40
79
|
```markdown
|
|
41
80
|
[Ravenmoor]{.name data-type="place/settlement"}
|
|
42
|
-
[Aldric Venn]{.name data-type="being"}
|
|
81
|
+
[Aldric Venn]{.name data-type="being/npc"}
|
|
43
82
|
```
|
|
44
83
|
|
|
45
84
|
`data-type` is optional. It names a declared [note type and
|
|
@@ -196,6 +235,40 @@ optional declared type; see [marking names](#marking-names-in-prose).
|
|
|
196
235
|
|
|
197
236
|
Inline Markdown remains active inside the span. Bracket spans have lower priority than URL links, image links, reference links, footnotes and wikilinks. A bracketed form immediately preceded by `!`, followed by `(` or another `[`, or beginning with `[[` is not a span, even when the link is unresolved. Ordinary links retain their existing syntax. Escape a bracket when it should be literal, or put examples inside a code span or fence. A span identifier addresses that point in the note; it does not start a journal page.
|
|
198
237
|
|
|
238
|
+
### Inline spoilers
|
|
239
|
+
|
|
240
|
+
Mark text itself as a spoiler with `.secret`. It can contain inline Markdown or
|
|
241
|
+
combine with a typed name for an unwritten subject:
|
|
242
|
+
|
|
243
|
+
```markdown
|
|
244
|
+
The key is [under the **third** stair]{.secret}.
|
|
245
|
+
The informant is [Aldric Venn]{.name .secret data-type="being/npc"}.
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
This marks only the enclosed text; it does not declare a target's audience.
|
|
249
|
+
For indexed subjects, use the ordinary wikilink and let the destination decide
|
|
250
|
+
whether the reference needs a spoiler. `.show` on a wikilink bypasses automatic
|
|
251
|
+
reference concealment; an enclosing authored `.secret` still marks its text.
|
|
252
|
+
|
|
253
|
+
On the website an inline spoiler has a button to show or hide its content.
|
|
254
|
+
It stays within the surrounding sentence, and links inside it can be followed
|
|
255
|
+
after revealing it. Foundry redacts inline `secret` spans with a solid cover;
|
|
256
|
+
hover the span or focus it with the keyboard to reveal its text, links and
|
|
257
|
+
images. A visible focus outline and a spoiler cue identify the interaction.
|
|
258
|
+
This does not change native Foundry secret-section controls. The book ignores
|
|
259
|
+
`.secret` on inline spans and prints their text normally, preserving emphasis,
|
|
260
|
+
links, anchors and `.name` bold styling. Secret sections and `:::secret` fences
|
|
261
|
+
retain their visible labelled boxes.
|
|
262
|
+
|
|
263
|
+
Published web HTML contains the spoiler's text. Revealing the spoiler or reading
|
|
264
|
+
the page source exposes it; this is presentation, not access control. GM-only
|
|
265
|
+
destination notes remain absent from public site and book output.
|
|
266
|
+
|
|
267
|
+
A `.secret` span does not start a journal page or change surrounding text.
|
|
268
|
+
Use a [secret heading](#a-section-players-must-not-read) to withhold a whole
|
|
269
|
+
Foundry page or a [secret block](#secret-blocks) for a passage in a labelled
|
|
270
|
+
section; those retain their own scope and presentation.
|
|
271
|
+
|
|
199
272
|
### Alerts
|
|
200
273
|
|
|
201
274
|
Alerts replace the former `:::info` and `:::warn` fences. Start with a special blockquote marker, optionally followed by an attribute block, then write the alert body as a standard blockquote:
|
|
@@ -362,8 +435,40 @@ Janapada
|
|
|
362
435
|
: Also the land associated with that community.
|
|
363
436
|
```
|
|
364
437
|
|
|
365
|
-
|
|
366
|
-
|
|
438
|
+
To continue the same definition, leave a blank line and indent the next
|
|
439
|
+
paragraph or block by four spaces. For a fenced code block, indent both fences
|
|
440
|
+
and its contents:
|
|
441
|
+
|
|
442
|
+
````markdown
|
|
443
|
+
Harbour due
|
|
444
|
+
: A toll on every hull that ties up.
|
|
445
|
+
|
|
446
|
+
The harbourmaster collects it before unloading begins.
|
|
447
|
+
|
|
448
|
+
```text
|
|
449
|
+
One hull: two silver pieces.
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
Anchorage
|
|
453
|
+
: A sheltered place where a ship can lie at anchor.
|
|
454
|
+
````
|
|
455
|
+
|
|
456
|
+
The continuation paragraph and code block belong to the same definition.
|
|
457
|
+
Repeat `:` only when starting a separate definition for the same term, as in
|
|
458
|
+
the first example. The next unindented term starts a new entry.
|
|
459
|
+
|
|
460
|
+
Definition lists use a dictionary hanging indent in the website, Foundry,
|
|
461
|
+
preview and book. A bold term begins the row, followed by its normally styled
|
|
462
|
+
definition. Short terms share a definition column 150px from the row's left
|
|
463
|
+
edge; browser viewports of 600px or less use 100px. The gap after a term is
|
|
464
|
+
`.75em`, with `.5em` between entries. A long term stays on one line and pushes
|
|
465
|
+
the first definition farther right; wrapped lines return to the common column.
|
|
466
|
+
The book uses the equivalent print dimensions.
|
|
467
|
+
|
|
468
|
+
HTML surfaces preserve the semantic `<dl class="dictionary">`, `<dt>` and `<dd>`
|
|
469
|
+
elements, with one grouping `<div>` for each term and all its definitions.
|
|
470
|
+
Multiple definitions, continuation paragraphs, nested lists and footnotes keep
|
|
471
|
+
their normal Markdown meaning. Infobox profiles retain their own layout.
|
|
367
472
|
|
|
368
473
|
## Lists
|
|
369
474
|
|
|
@@ -997,8 +1102,8 @@ common.
|
|
|
997
1102
|
|
|
998
1103
|
Public dictionaries omit citations to GM-only notes. `links` checks generated
|
|
999
1104
|
tables in the source note's audience: public notes use public rows, and GM
|
|
1000
|
-
notes retain GM citations. An authored
|
|
1001
|
-
note is
|
|
1105
|
+
notes retain GM citations. An authored wikilink from a public note to a GM-only
|
|
1106
|
+
note is valid and follows the [secret-reference rules](#references-to-secret-subjects).
|
|
1002
1107
|
|
|
1003
1108
|
#### Custom views
|
|
1004
1109
|
|
package/docs/commands.md
CHANGED
|
@@ -66,6 +66,50 @@ behaviour where they appear below; read the command, not the name.
|
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
|
+
## Standalone source preview
|
|
70
|
+
|
|
71
|
+
### `package-build-preview`
|
|
72
|
+
|
|
73
|
+
**NAME**
|
|
74
|
+
|
|
75
|
+
Render a Markdown buffer without a content index.
|
|
76
|
+
|
|
77
|
+
**SYNOPSIS**
|
|
78
|
+
|
|
79
|
+
`package-build-preview [--dark] [--current-date DATE] [--css] < note.md`
|
|
80
|
+
|
|
81
|
+
**DESCRIPTION**
|
|
82
|
+
|
|
83
|
+
Reads Markdown from stdin and writes an HTML fragment. Requires no package
|
|
84
|
+
configuration. Local Markdown and extensions render; constructs needing other
|
|
85
|
+
notes remain highlighted source. Shared CSS is supplied separately.
|
|
86
|
+
|
|
87
|
+
**OPTIONS**
|
|
88
|
+
|
|
89
|
+
- `--dark` — select dark mode; light is the default.
|
|
90
|
+
- `--current-date DATE` — override the setting-wide neutral current date; otherwise
|
|
91
|
+
read the nearest root configuration setting, defaulting to `"720.1"`.
|
|
92
|
+
- `--css` — emit the shared scoped stylesheet without reading stdin.
|
|
93
|
+
- `--help`, `-h` — show usage.
|
|
94
|
+
|
|
95
|
+
**EXIT STATUS**
|
|
96
|
+
|
|
97
|
+
0 on success, 1 for an invalid argument or rendering error. Findings go to
|
|
98
|
+
stderr; stdout contains only HTML (or CSS with `--css`).
|
|
99
|
+
|
|
100
|
+
**EXAMPLES**
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
package-build-preview --dark < note.md > preview.html
|
|
104
|
+
package-build-preview --css > preview.css
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**SEE ALSO**
|
|
108
|
+
|
|
109
|
+
[Source preview and Gitea renderer](source-preview.md), [API](api.md).
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
69
113
|
## Package and release operations
|
|
70
114
|
|
|
71
115
|
### `package-build ci`
|
|
@@ -3017,7 +3061,7 @@ exactly as given, at every depth, and every field it leaves out is generated:
|
|
|
3017
3061
|
| `data.templatePriority`, `data.occupation`, `data.died` | `null`. |
|
|
3018
3062
|
| `data.lore`, `data.homes` | `[]`. |
|
|
3019
3063
|
| `data.affiliations` | `{}`. |
|
|
3020
|
-
| `data.born` | An adult age of 18 to 60 years before the
|
|
3064
|
+
| `data.born` | An adult age of 18 to 60 years before the configured `currentDate` (default `"720.1"`), as a `<year>.<day>` date. |
|
|
3021
3065
|
| `data.frame`, `data.appearance.*` | Weighted draws from the culture's appearance profile; `extra_features` is `[]`. |
|
|
3022
3066
|
| `data.height` | From the profile's range for the gender, in feet and inches. |
|
|
3023
3067
|
| `data.weight` | From the height and the frame's body-mass band, in pounds. A spec giving height and weight but no frame gets the frame they imply. |
|
|
@@ -3105,7 +3149,7 @@ dossier: |
|
|
|
3105
3149
|
record rather than of reputation.
|
|
3106
3150
|
```
|
|
3107
3151
|
|
|
3108
|
-
Run against a package
|
|
3152
|
+
Run against a package configured with `currentDate: "720.300"`, whose
|
|
3109
3153
|
`khelathi` culture carries the profile in
|
|
3110
3154
|
[appearance profiles](reference/format-details.md#appearance-profiles) and
|
|
3111
3155
|
names `language: skill-khelathilng`, and whose language carries the lists in
|
package/docs/configuration.md
CHANGED
|
@@ -54,7 +54,7 @@ around its own evaluation.
|
|
|
54
54
|
|
|
55
55
|
### Quick reference
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
24 top-level keys. `rootDir` is not one of them — a data configuration never
|
|
58
58
|
writes it — and is documented under [Derived values](#derived-values) instead,
|
|
59
59
|
alongside `foundryPackage`, `homepage`, `author` and `itemBuilders`, whose
|
|
60
60
|
data-configuration behaviour is also derivation rather than ordinary
|
|
@@ -62,6 +62,7 @@ authoring.
|
|
|
62
62
|
|
|
63
63
|
| Key | Type | Required | Default |
|
|
64
64
|
| ------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ------------------------- |
|
|
65
|
+
| [`currentDate`](#currentdate) | quoted neutral date string | no | `"720.1"` |
|
|
65
66
|
| [`contentPackage`](#contentpackage) | string | yes | — |
|
|
66
67
|
| [`foundryPackage`](#foundrypackage) | string | yes (`.mjs` only — derived in YAML); refused in a `documentation` package | — |
|
|
67
68
|
| [`homepage`](#homepage) | string | no (`.mjs` only — derived in YAML) | `null` |
|
|
@@ -87,7 +88,7 @@ authoring.
|
|
|
87
88
|
|
|
88
89
|
Any key outside this list is refused:
|
|
89
90
|
|
|
90
|
-
> `` `<key>` is not a recognized option (expected one of: rootDir, contentPackage, foundryPackage, homepage, authors, packageKind, stats, itemBuilders, paths, skipDirectories, forbidGeneratedArt, icons, packs, docs, site, pdf, compatibility, relationships, systems, requiresSystem, packageBuild, publish, changelog). ``
|
|
91
|
+
> `` `<key>` is not a recognized option (expected one of: rootDir, contentPackage, currentDate, foundryPackage, homepage, authors, packageKind, stats, itemBuilders, paths, skipDirectories, forbidGeneratedArt, icons, packs, docs, site, pdf, compatibility, relationships, systems, requiresSystem, packageBuild, publish, changelog). ``
|
|
91
92
|
|
|
92
93
|
(`rootDir` appears in that list because it is a key `defineConfig` itself
|
|
93
94
|
accepts — an `.mjs` configuration authors it directly. A YAML configuration
|
|
@@ -194,7 +195,7 @@ build writes its `name` as `params.author`. `null` when `authors` is empty.
|
|
|
194
195
|
as an unknown key, at the key's own line, because `authors` is the one list a
|
|
195
196
|
package names its people in:
|
|
196
197
|
|
|
197
|
-
> ``package-build config: `author` is not a recognized option (expected one of: rootDir, contentPackage, foundryPackage, homepage, authors, packageKind, stats, itemBuilders, paths, skipDirectories, forbidGeneratedArt, icons, packs, docs, site, pdf, compatibility, relationships, systems, requiresSystem, packageBuild, publish, changelog).``
|
|
198
|
+
> ``package-build config: `author` is not a recognized option (expected one of: rootDir, contentPackage, currentDate, foundryPackage, homepage, authors, packageKind, stats, itemBuilders, paths, skipDirectories, forbidGeneratedArt, icons, packs, docs, site, pdf, compatibility, relationships, systems, requiresSystem, packageBuild, publish, changelog).``
|
|
198
199
|
|
|
199
200
|
`package.json`'s own `author` is npm's and is not read.
|
|
200
201
|
|
|
@@ -294,7 +295,23 @@ Unlike the first three, authoring `itemBuilders` is not an error — it is
|
|
|
294
295
|
|
|
295
296
|
---
|
|
296
297
|
|
|
297
|
-
##
|
|
298
|
+
## Configuration keys
|
|
299
|
+
|
|
300
|
+
### `currentDate`
|
|
301
|
+
|
|
302
|
+
The setting-wide date used for computed ages, age lint, content-index dates,
|
|
303
|
+
Foundry and website output, NPC generation and editor preview. It defaults to
|
|
304
|
+
`"720.1"`. Quote the value so YAML preserves the exact ordinal day digits:
|
|
305
|
+
|
|
306
|
+
```yaml
|
|
307
|
+
contentPackage: thalorna
|
|
308
|
+
currentDate: "720.130"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Use a neutral `<year>[.<day>[:HHMMSS]]` string. A bare quoted year means its first
|
|
312
|
+
day. Named calendars, `unknown`, numeric YAML values and malformed dates are
|
|
313
|
+
configuration errors located at `currentDate`. Birth dates can still use named
|
|
314
|
+
calendars when the output has the relevant calendar context.
|
|
298
315
|
|
|
299
316
|
### `contentPackage`
|
|
300
317
|
|
package/docs/content-format.md
CHANGED
|
@@ -52,8 +52,10 @@ for examples and placement in journals, web pages, and books.
|
|
|
52
52
|
An inline `{{sql "SELECT COUNT(*) FROM notes"}}` expression inserts one scalar query result. Use `{{words (sql "SELECT COUNT(*) FROM notes")}}` for a count in running prose, or `{{digits (sql "SELECT COUNT(*) FROM entries")}}` for grouped numerals. The query must return exactly one row and one column with a nonempty value; a mismatch is a located build error. Prefix `\{{` to show the syntax literally. The [expression reference](reference/format-details.md#dates-and-calendars) describes the helpers and the available SQL relations.
|
|
53
53
|
|
|
54
54
|
Add `gm` to `tags` for a GM-only note. Public site and book builds omit it;
|
|
55
|
-
Foundry compiles it only into private compendiums.
|
|
56
|
-
|
|
55
|
+
Foundry compiles it only into private compendiums. Ordinary wikilinks to it
|
|
56
|
+
conceal the whole reference as a spoiler; `.show` reveals just the reference.
|
|
57
|
+
`[text]{.secret}` marks text itself as a spoiler. Neither changes the target's
|
|
58
|
+
access permissions. The [frontmatter guide](authoring/frontmatter.md#frontmatter-and-system-blocks)
|
|
57
59
|
explains routing for documents and their prose journals.
|
|
58
60
|
|
|
59
61
|
A note can also produce a system document: an Actor, Item, Scene, or Macro according to its type and system blocks. The `sohl:` and `hm3:` blocks supply game-specific mechanics and overrides; they do not create separate prose. The JournalEntry is shared between systems.
|