Skip to content

About

Skeleton architecture documentation site based on Quarto

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Architecture site

Architecture documentation and analyses for the platform, written in plain Markdown and built with Quarto into:

  • a website published to GitLab Pages (public/);
  • a PDF and a Word document for every analysis, linked from its page;
  • the complete architecture document as one PDF and one Word file;
  • content that can be pushed to Confluence with quarto publish.

The Markdown is the only source. Nothing is generated by hand, and there are no per-document build scripts: every document inherits the same house formats from the quarto-house extension.

Layout

.
├── _quarto.yml              the site manifest (navigation, formats, output dir)
├── _extensions/scattercode/house/   the house style, installed by `quarto add`
├── index.qmd                landing page
├── analyses.qmd             listing of every analysis, newest first
├── architecture/            the top-level architecture document
│   ├── _metadata.yml        settings for every chapter
│   ├── index.qmd            section landing page
│   ├── 01-overview.md       a hand-written chapter
│   ├── 02-environments.qmd  a chapter generated from data/
│   ├── 03-glossary.md
│   ├── complete.qmd         the chapters combined → complete.pdf / .docx
│   └── assets/              diagrams (hand-drawn SVG and generated)
├── analysis/
│   ├── _metadata.yml        "every analysis renders to html + pdf + docx"
│   ├── _template/           copied by scripts/new-analysis.sh
│   └── 2026-10-<topic>/     one folder per analysis
│       ├── index.qmd
│       └── assets/
├── data/                    machine-readable platform descriptions (JSON)
├── scripts/
│   ├── platformdata.py      loads data/ for the generated chapters
│   ├── check-refs.py        cross-reference checks, no render needed
│   └── new-analysis.sh      start a new analysis from the template
├── ci/Dockerfile            optional prebuilt rendering image
├── .gitlab-ci.yml           check → render → publish to Pages
└── Makefile                 the everyday commands

Everyday use

make preview        # live-reloading website while you write
make                # check references, then render everything into public/
make html           # website only — much faster than the PDFs
make pdf DOC=analysis/2026-10-topic/index.qmd   # one document's PDF
make new SLUG=backup-vault TITLE="Backup vault segregation"
make check          # cross-reference checks only

Outputs land in public/, which is git-ignored. Each analysis page has "Other Formats" links to its PDF and Word versions; the complete architecture document is at public/architecture/complete.pdf.

Prerequisites

  • Quarto 1.5 or later (brew install --cask quarto).
  • A TeX distribution with XeLaTeX (quarto install tinytex).
  • rsvg-convert for SVG diagrams (brew install librsvg).
  • Python 3 with pip install -r requirements.txt for the generated chapters.

Writing

Chapters of the architecture are files in architecture/ named NN-slug.md (or .qmd when they contain code). Keep exactly one H1 per file, with a manual number — # 4. Data products {#sec-data-products} — the build strips the number and numbers the output itself, and the manual number keeps the source readable on a wiki. Add each new chapter to architecture/complete.qmd as well, in reading order; the sidebar picks chapters up automatically but the combined document does not.

Analyses live one per folder under analysis/, named YYYY-MM-slug, with an index.qmd and whatever assets they need. make new copies the template. The template's front matter has an abstract, which becomes the summary on the PDF title page, and a description, which appears in the analyses listing.

Cross-references, never typed numbers. Give headings IDs ({#sec-topic-slug}) and refer to them as @sec-topic-slug. Inside one document that renders as "Section 2.1", linked. On the website, a reference to a heading on a sibling page becomes a link to that page carrying the heading's text — so the same source works as separate pages and as the combined PDF. Never write "section 3" or "chapter 2" by hand; scripts/check-refs.py reports it. Never let a line start with @sec-x), @sec-x. or (@sec-x) — Pandoc reads that as a list marker.

Links between pages are ordinary Markdown links to the source file ([the glossary](03-glossary.md)). On the website they become page links; in PDF and Word output they become plain text, since the target is not in the document.

Diagrams are hand-drawn SVG in the folder's assets/, in the house style (see CLAUDE.md). Quarto converts them for PDF and Word.

Generated content

Some chapters are produced from the JSON extracts in data/ rather than written by hand. The pattern is in architecture/02-environments.qmd:

  1. scripts/platformdata.py reads the JSON once into plain Python objects (Environment, Workspace). It is the only place that knows the JSON's shape — if the producing pipeline changes its output, change that file.
  2. A chapter has Python cells marked #| output: asis that import the module and print() Markdown: tables with md_table(...), lists, prose with the numbers filled in. Quarto runs the cell and treats what it prints as part of the chapter, so the same cell serves the website, the PDF and the Word file.
  3. Generated diagrams go through write_diagram(...), which writes the SVG to assets/ together with PDF and PNG copies, and returns the image path to print. One reference then serves every format (the house formats set the default image extension per format), and the SVG is there to reuse on a wiki or a Miro board.

Executed cells are cached in _freeze/ (freeze: auto in _quarto.yml), so a render only re-runs the Python when the chapter's source changes. Commit _freeze/ if you want CI to skip execution; delete it to force a re-run after the data changes — or run quarto render --execute in CI, which ignores the cache. The data itself arrives however the producing pipeline delivers it: copied in by a CI job, fetched in before_script, or committed when it changes.

Publishing

GitLab Pages: .gitlab-ci.yml checks references, renders, and publishes public/ on the default branch. Merge requests render too, so a broken cross-reference or a LaTeX error fails the pipeline before merge. The job installs TeX on every run; for a faster pipeline, build ci/Dockerfile once, push it to the project's container registry and set IMAGE to it.

Confluence: quarto publish confluence pushes rendered pages into a Confluence space; the first run asks which space and parent page, and records the answer in _publish.yml. To publish only part of the site, run it from the directory you want (cd analysis && quarto publish confluence). See https://quarto.org/docs/publishing/confluence.html.

Sharing one document: the PDF under public/ for that document is the thing to attach — it is produced by the same build as everything else.

Updating the house style

The style lives in the quarto-house extension, vendored under _extensions/. make extension re-installs the latest version from GitHub; to pin a version, quarto add scattercode/quarto-house@v0.1.0. Commit the _extensions/ directory — a fresh clone must render without a network call.

architecture-site

About

Skeleton architecture documentation site based on Quarto

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages