Skip to content

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

Unresolved Notes Index (unresolved-notes/index.html)

2. RSS Feed (feed.xml)

3. Sitemap (sitemap.xml)

4. Robots Rules (robots.txt)

5. Search Index (search.json)

6. Taxonomy Pages (tags/ and categories/)

7. Graph & Metadata Files (graph.json, backlinks.json, meta.json)

8. Knowledge Graph Explorer (graph/index.html)

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/)

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:

  1. --site-url / --siteurl CLI flag (explicit runtime override)
  2. siteurl (or site_url) field in config.yaml
  3. Environment variables SITE_URL or LA_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 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:

Do Not Publish / Internal Only

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.