La Famille / Field notes
Publishing Output Contract
This document specifies the contract, generation conditions, URL structures, and exclusion rules for all publishing artifacts produced by La Famille during static site generation.
Overview of Generated Artifacts
When la-famille build executes, it processes Markdown source files in contentDir and writes output files to outputDir. The generator produces rendered HTML pages, search and discovery files, taxonomy listings, link graphs, and structural metadata.
The publish artifact is the complete public/ (or configured output_dir)
tree. GitHub Pages uploads that directory with the Pages artifact/deploy
actions; this project does not publish a gh-pages branch.
| Artifact | Output Path | Generation Condition | Primary Purpose |
|---|---|---|---|
| HTML Pages | <slug>/index.html or <path>/index.html |
Rendered for every .md source file with render != false |
Public site web pages |
| Unresolved Notes Index | unresolved-notes/index.html |
Generated on every build | To-write list linking to generated missing-note stubs |
| RSS Feed | feed.xml |
Generated when at least one rendered page has a date field |
Syndication feed for web readers |
| Sitemap | sitemap.xml |
Generated on every build | Search engine discovery |
| Robots Rules | robots.txt |
Generated on every build | Search engine crawler rules & sitemap location |
| Search Index | search.json |
Generated on every build | Client-side search index |
| Taxonomies | tags/, categories/ |
Generated when pages specify tags or categories frontmatter, or contain body hashtags |
Rendered tag and category index & detail pages |
| Link Graph | graph.json |
Generated on every build | Page node and wikilink edge dataset |
| Backlinks | backlinks.json |
Generated on every build | Map of target page IDs to referencing parent page IDs |
| Site Metadata | meta.json |
Generated on every build | Page metadata dictionary |
| Knowledge Graph Explorer | graph/index.html |
Generated on every build when graph_explorer: true (default) |
Self-contained interactive visualization of the site’s wikilink relationships |
| Explorer Payload | graph/data.json |
Generated alongside graph/index.html |
Resolved node list the explorer page renders: link direction, classification, titles, and public URLs |
| RAG Export | rag-archive/ (rag-system.md, rag-config.md, rag-content.md) |
Not produced by build; written by the separate la-famille rag command. CI writes it into public/rag-archive/ after the build step |
Markdown bundles of source/config/content for LLM and retrieval use |
Bundled theme CSS/images under assets/ are published only when referenced by
generated HTML or site CSS/JS. This applies to both embedded fallbacks and
unchanged copies installed by init; edited files and other site-owned assets
are copied as before. Search assets remain available, and the graph bundle
still follows graph_explorer. To ship theme assets referenced only at
runtime, set include_unused_theme_assets: true in config.yaml.
Detailed Artifact Contracts
1. HTML Pages & Metadata Tags
- Generation: Each
.mdfile whererenderistrue(default) is compiled through the template layout. - Canonical & OpenGraph Metadata: Rendered inside
<head>:<link rel="canonical" href="...">: Contains the absolute URL ifsiteurlis configured (e.g.https://example.com/about/), or root-relative URL (e.g./about/) ifsiteurlis unconfigured.<meta property="og:url" content="...">: Set to the canonical URL.<meta property="og:title" content="...">: Page title (or filename fallback).<meta property="og:description" content="...">: Frontmatterdescription, ordefault_descriptionfromconfig.yaml.<meta property="og:image" content="...">: Frontmatterimage, ordefault_og_imagefromconfig.yaml.
- Rendered content pages include a “Linked from” panel. Its inbound links reuse
the same relationships written to
backlinks.json; generated stubs already list their referring pages.
Unresolved Notes Index (unresolved-notes/index.html)
- Generation: Written on every build, including builds with no unresolved links (which show an empty-state message).
- Entries: Each generated stub is listed by note title and linked to its generated URL. A note disappears from the list once a real Markdown file replaces the missing target and the site is rebuilt.
- Navigation: A site-wide Unresolved Notes link is added to the generated pages.
2. RSS Feed (feed.xml)
- Generation: Written to
outputDir/feed.xmlwhenever there is at least one rendered page containing a non-emptydatefrontmatter field (formatted asYYYY-MM-DD). - Clean-up: If a build contains zero dated rendered pages, any existing
feed.xmlinoutputDiris deleted to prevent serving stale feeds. - Content: Contains RSS 2.0
<item>elements sorted by date (newest first). Each item includes<title>,<link>,<guid>,<pubDate>(RFC1123Z format), and<description>(extracted text snippet).
3. Sitemap (sitemap.xml)
- Generation: Written on every build using standard XML sitemap format (
http://www.sitemaps.org/schemas/sitemap/0.9). - Included URLs: Unique output locations for all rendered Markdown pages and generated taxonomy pages (
tags/index.html,tags/<tag>/index.html,categories/index.html,categories/<cat>/index.html). - Exclusions: Pages with
render: falseand unrendered raw files are excluded. - Notes with frontmatter
publish: falseare omitted from the static site and its graph, backlinks, search index, sitemap, and published links. The separatela-famille ragcommand also omits them fromrag-content.md.
4. Robots Rules (robots.txt)
- Generation: Written on every build containing:
User-agent: * Allow: / - Sitemap Directive: If
siteurlis configured, appendsSitemap: <siteurl>/sitemap.xml. Ifsiteurlis omitted/empty, theSitemap:line is omitted.
5. Search Index (search.json)
- Generation: Minified JSON array written to
outputDir/search.json. - Item Fields:
t(Title): Page title or taxonomy heading.u(URL): Root-relative URL path (e.g.,/posts/first-post/).g(Tags/Categories): Combined slice of tags and categories.s(Snippet): Up to 160 characters of clean text extracted from page body (stripping Markdown codeblocks, HTML tags, and formatting).h(Headings): Extracted ATX heading titles (#through######).w(Wiki targets): Optional list of explicit[[wiki-link]]destinations referenced by the page.
- Included Entries: Includes all rendered content pages and all generated taxonomy pages.
6. Taxonomy Pages (tags/ and categories/)
- Generation: When content files declare
tagsorcategoriesfrontmatter, or contain body hashtags such as#ceramics:- Main index pages are generated at
tags/index.htmlandcategories/index.html. - Term detail pages are generated at
tags/<tag-name>/index.htmlandcategories/<category-name>/index.html.
- Main index pages are generated at
- Body tags: A
#tagin Markdown text joins the page’s frontmattertagsfor/tags/archives, page tag links, search, and metadata. Headings, code, links, and URLs are not treated as body tags. Body hashtags must contain at least one Unicode letter;#3d-printingis a tag, but a numeric reference such as#599is not. Declare numeric tags explicitly in frontmatter. - Content: Lists titles and relative links of associated rendered pages.
- Exclusions: Pages with
render: falseare excluded from tag/category aggregation.
7. Graph & Metadata Files (graph.json, backlinks.json, meta.json)
graph.json: Containsnodesmap (keyed by page ID) andedgeslist of directed wikilink pairs[source, target]. Nodes include"type": "page"and"render": true|false.backlinks.json: Map of target page ID -> sorted array of referencing parent page IDs.meta.json: Map of page ID -> metadata object (title,author,date,tags,word_count,render,categories). Unknown fields are forward-compatible additions.- Wiki links (
[[target]], aliases, and[[target#heading]]) are resolved during build and contribute to the same graph and backlinks. Missing targets create visibleUnresolved Note: <target>stubs; their titles are included inmeta.json.
8. Knowledge Graph Explorer (graph/index.html)
- Generation: Written to
<output_dir>/graph/index.htmlwhen thegraph_explorerconfig option is true (default). When disabled, neither the page nor its companion assets directory are emitted and no nav link is injected into layouts. - Companion assets:
assets/graph/explorer.jsandassets/graph/explorer.cssare copied into<output_dir>/assets/graph/by the asset pipeline. A released binary embeds fallback copies; files present in the selected site asset directory remain authoritative overrides. - Runtime semantics: The page is fully static — it loads
../graph.json,../meta.json, and../backlinks.jsonvia relative fetches and never contacts a remote host. A<link rel="canonical">is emitted only whensiteurlis configured; without it the page works the same when opened directly viafile://. - No change to existing contracts: The explorer’s writer does NOT extend
graph.json,meta.json, orbacklinks.json. It emits its owngraph/data.jsonpayload, assembled in Go from the same graph the build already computed. Public URLs there follow the path each page was actually written to, so front-matterslug:overrides and sub-path deployments (for example a GitHub Pages project site) both produce correct links.
Manual Navigation Snippet
Adding a global nav link to every bundled template would break custom-template compatibility, so the explorer does not auto-inject one. Drop this anywhere inside a layout that you control:
<a href="/graph/" rel="nofollow">Knowledge Graph</a>
The link is root-relative so it works with or without siteurl, mirroring the explorer’s own URL construction.
9. RAG Export (rag-archive/)
- Generation: Not part of
la-famille build. Produced by the separatela-famille ragcommand (internal/ragexport), which writes three markdown bundles:rag-system.md: Go source, workflows, and module metadata.rag-config.md: config/templates/assets listing.rag-content.md: published Markdown content (excludingcontent/julesand notes withpublish: false).
- Output location:
rag_dirfromconfig.yaml(defaultrag-archive/, beside the project root). In CI, pass--output public/rag-archiveso the bundles ship inside the Pages artifact — this is what.github/workflows/deploy.ymldoes after the build step. - Publish interaction:
publish-checkvalidates whatever tree exists; it does not requirerag-archive/. Apublic/tree with or without the export is publishable.
Explorer Orphan Rule
The explorer flags a page as orphan when it has zero inbound links unless the page id is index (the rendered homepage). Rendered pages named about, posts/2026/welcome, etc. follow the standard zero-inbound rule. Raw render: false pages never appear as orphan candidates because their IDs carry the .md suffix and the rule is not applied to them. Sites that use render: false for their homepage must provide inbound links from somewhere else.
Large-Site Threshold
Sites with ≥ 500 nodes default to a search-first view; the graph visualization is suppressed until the user clicks a search suggestion. The threshold is exposed in the page footer so future tuning can be done without code changes.
Configuration Impact: siteurl / SiteURL
The siteurl configuration option defines the public canonical base URL (e.g. https://example.com).
| Context | When siteurl is Configured |
When siteurl is Empty / Unset |
|---|---|---|
| Canonical Link Tag | <link rel="canonical" href="https://example.com/about/"> |
<link rel="canonical" href="/about/"> |
| OpenGraph URL | <meta property="og:url" content="https://example.com/about/"> |
<meta property="og:url" content="/about/"> |
| RSS Feed Item Link | <link>https://example.com/posts/p1/</link> |
<link>/posts/p1/</link> |
| Sitemap Location | <loc>https://example.com/about/</loc> |
<loc>/about/</loc> |
| Robots Sitemap | Includes Sitemap: https://example.com/sitemap.xml |
Omitted from robots.txt |
Public URL Resolution Order
During la-famille build, the public site URL is resolved in the following priority:
--site-url/--siteurlCLI flag (explicit runtime override)siteurl(orsite_url) field inconfig.yaml- Environment variables
SITE_URLorLA_FAMILLE_SITE_URL(ideal for GitHub Pages & CI/CD runners)
In GitHub Pages deployments (deploy.yml), actions/configure-pages@v6 provides steps.pages.outputs.base_url, which is automatically passed to --site-url or SITE_URL.
Unrendered Pages (render: false)
Frontmatter allows specifying render: false to copy raw file contents directly to output without template layout rendering or sanitization.
Exclusion vs Inclusion Rules for render: false
-
EXCLUDED from:
- HTML template layouts (no
<head>, canonical tags, or HTML wrappers) feed.xml(RSS feed items)sitemap.xmlsearch.json(search index entries)- Taxonomy index and term detail pages (
tags/,categories/)
- HTML template layouts (no
-
INCLUDED in:
graph.json(as a node with"render": false)meta.json(with"render": false)backlinks.json(tracked if referenced by or referencing other pages via wikilinks)
Excluded Notes (publish: false)
Notes with publish: false remain in the source directory but are omitted
from generated output and rag-content.md. Links in included notes to
excluded notes retain their visible label as plain text and do not create a
published link, graph edge, backlink, or stub. The check command evaluates
orphan status over the published subset.
Safe to Publish vs Internal Cache Files
When deploying the generated static site to production or static web hosts:
Safe to Publish (Web Root)
All files and subdirectories created in outputDir are intended for public web serving, including:
- HTML pages and assets
feed.xml,sitemap.xml,robots.txtsearch.jsongraph.json,backlinks.json,meta.jsongraph/index.html(Knowledge Graph Explorer) andassets/graph/explorer.{js,css}rag-archive/(RAG export bundles), when thela-famille ragstep ran with--output <output_dir>/rag-archive
Do Not Publish / Internal Only
.la-famille-cache.json: Incremental build state stored beside the project root. A correct build never places it inoutputDir;publish-checkrejects an accidental copy..la-famille-vectors.json: Legacy private assistant cache. New caches are no longer created, but existing copies remain private andpublish-checkstill rejects them anywhere in the output tree..staging-*directories: Temporary build staging folders created during atomic build execution. Cleaned up automatically upon build completion;publish-checkrejects any that leak into the output.
publish-check also enforces the artifact contract itself: sitemap.xml, robots.txt, search.json, graph.json, backlinks.json, and meta.json must always be present, and feed.xml is required whenever meta.json lists a dated rendered page (mirroring the generator’s own feed condition).
Run the artifact check before deployment:
la-famille --project-root /path/to/site publish-check --output public
It emits a deterministic manifest and verifies local href/src references,
including clean-URL directories and the graph explorer’s payload/assets.
Source checkout vs released binary
| Use case | Recommended command | Notes |
|---|---|---|
| Develop the generator | go run ./cmd/la-famille ... |
Requires the Go toolchain and source checkout. |
| Build an external site in CI | la-famille --project-root /path/to/site ... |
Requires only the verified release archive. |
| GitHub Pages | release binary from LA_FAMILLE_VERSION |
The workflow checks SHA256SUMS and uploads public/; empty variable is a development source fallback. |
Knowledge Graph Explorer
| Aspect | Detail |
|---|---|
| Page path | <output_dir>/graph/index.html (controlled by graph_explorer: true config, default: true) |
| Companion bundle | <output_dir>/assets/graph/explorer.{js,css} copied from the selected site asset directory when present, otherwise supplied by the released binary’s embedded fallback |
| Data sources | ../graph.json, ../meta.json, ../backlinks.json (loaded at runtime via relative fetches) |
| Runtime network calls | None. The page is fully static; no remote scripts, fonts, or APIs are loaded. |
| Canonical URL | Emitted only when siteurl is configured. Otherwise the page works the same when opened directly via file://. |
| Slug handling | Public URLs are resolved by the generator from the output path each page was written to, so frontmatter slug: overrides link correctly. |
| Sub-path deploys | URLs include the base path from siteurl, so a project site such as https://user.github.io/project links to /project/... rather than /.... |
| Link direction | Inbound and outbound neighbours are computed once in internal/graph.Adjacency from the [source, target] edge list, deduplicated and sorted. The client renders them; it does not re-derive them. |
| Disabled behavior | With graph_explorer: false, neither /graph/ nor /assets/graph/* are emitted and no nav link is auto-injected. |
Threshold for large sites
Sites with ≥ 500 nodes open in search-first mode; the graph visualization stays suppressed until the user clicks a search suggestion. The threshold is exposed in the page footer so future tuning can be done without code changes.
Manual Navigation Anchor
<a href="/graph/" rel="nofollow">Knowledge Graph</a>
Root-relative, so it works with or without siteurl — mirroring the explorer’s own URL construction.
Orphan Rule (Explorer)
A page is treated as orphan when its inbound list is empty, with one carve-out: the rendered homepage (page id index) is exempt so a freshly-seeded site that links out from index.md doesn’t flag index as orphan. Rendered sub-pages, raw render: false pages (whose IDs carry the .md suffix), and sites that use render: false for the homepage follow the standard zero-inbound rule.