give the author three controls the engine was deciding alone
`include: merge` in frontmatter splices a bundle's includes before the parse, so
a page assembled from several files is one document: one footnote list at its
end, numbered straight through, and an abbreviation defined anywhere reaching
every part. Moving the rendered block afterwards would have meant editing
goldmark's own markup; handing the parser one source gets the right answer from
it instead. Without the flag nothing changes — each fragment stays its own
document with namespaced ids, so no existing content re-renders.
Heading ids are unique under either model. Merging gets that free, because one
parse means one id set, but embedding did not: three `## Description`s across a
page and its fragments produced three identical anchors, and every link to them
landed on the first. A nested parse now shares the parent's id set, so the
second becomes #description-1 — goldmark's own suffixing, reaching across files
because they finally share the set it counts in.
Auditing for other policies the author could not reach found two more.
A heading may declare its anchor: `## Title {#stable-anchor}`. This is the one
that mattered most and nobody had asked for it — a derived id changes when the
text does, so rewording a heading silently broke every link to that anchor,
which is indefensible in an engine whose first value is that published addresses
are permanent.
`::toc{depth=2}` shortens a contents list, because a theme cannot know per page
how deep is useful and the author can.
Deliberately not added: a typographer toggle, a per-picture "do not resample",
icon overrides. No second user for any of them.
The hand-copied wiring in example_test.go drifted for the third time this
session — Compose this time, after the dialect and notation — each caught by a
demo case rather than by the copy. The latent row is now marked due, with what
moving the list would require.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
title: Notes on Water
|
||||
date: 2026-03-25
|
||||
tags: [monsoon, journal]
|
||||
include: merge
|
||||
---
|
||||
The finished piece. Below, a part of it lives in a separate file and is included here:
|
||||
|
||||
@@ -10,11 +11,14 @@ The finished piece. Below, a part of it lives in a separate file and is included
|
||||
That fragment starts with an underscore, so the scanner never treats it as a bundle: it has no URL of its own
|
||||
and appears in no listing. An included file cannot itself include — one level, deliberately.
|
||||
|
||||
This bundle declares `include: merge`, so the fragment is spliced in before anything is parsed: its footnote
|
||||
is numbered with the page's and both appear in one list at the end, rather than one list per part.
|
||||
|
||||
This bundle also has an `extras/` directory, so the theme offers a link to it at the foot of the page.
|
||||
|
||||
::toc
|
||||
|
||||
## Readings
|
||||
## Readings {#gauge-readings}
|
||||
|
||||
The page has a footnote of its own[^page], numbered from one independently of the fragment's.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user