|
| 1 | +# Maintaining this site |
| 2 | + |
| 3 | +Notes for whoever edits the docs next — human or agent. |
| 4 | + |
| 5 | +!!! warning "Keep the docs in sync with the toolkit" |
| 6 | + This site is a **superset of `README.md` + `PLAYBOOK.md`**, not a fork. When |
| 7 | + you change the toolkit — add/rename a tool, change a phase, alter a command or |
| 8 | + flag, add a guardrail/lesson — **update the affected page under `docs/` in the |
| 9 | + same change.** The pages that drift fastest: |
| 10 | + |
| 11 | + - `docs/phases.md` — phase commands and guardrails |
| 12 | + - `docs/tools.md` — the tool tables (one row per script in `tools/`) |
| 13 | + - `docs/pipeline.md` — the Mermaid flow and the phases-at-a-glance line |
| 14 | + |
| 15 | +## How it's built and deployed |
| 16 | + |
| 17 | +- **Engine:** MkDocs + Material. Config: [`mkdocs.yml`](https://github.com/gallantlab/literature-review-toolkit/blob/main/mkdocs.yml). Content: `docs/`. |
| 18 | +- **Deploy:** [`.github/workflows/docs.yml`](https://github.com/gallantlab/literature-review-toolkit/blob/main/.github/workflows/docs.yml) |
| 19 | + runs on every push to `main` that touches `docs/**`, `mkdocs.yml`, or the |
| 20 | + workflow. It runs `mkdocs build --strict` (a broken link or missing file |
| 21 | + **fails the build**) and publishes to GitHub Pages. |
| 22 | +- **Live URL:** <https://gallantlab.org/literature-review-toolkit/> — the |
| 23 | + `gallantlab` org serves project Pages under its **custom domain**, so |
| 24 | + `site_url` in `mkdocs.yml` is `gallantlab.org`, **not** `github.io`. Don't |
| 25 | + "correct" it back. |
| 26 | +- **Repo is public** — that's what lets free GitHub Pages serve it. |
| 27 | + |
| 28 | +## Preview locally |
| 29 | + |
| 30 | +```bash |
| 31 | +pip install -r docs/requirements.txt |
| 32 | +mkdocs serve # http://127.0.0.1:8000, live-reload |
| 33 | +mkdocs build --strict # what CI runs; fix anything it flags before pushing |
| 34 | +``` |
| 35 | + |
| 36 | +## Where the figures come from |
| 37 | + |
| 38 | +All example figures are **real outputs from actual reviews**, copied into |
| 39 | +`docs/assets/`: |
| 40 | + |
| 41 | +- `assets/figures/lineage_*.png` — families figures (`families_figure.py` output) |
| 42 | + from various review subdirectories. |
| 43 | +- `assets/figures/lab_*.png` — the `gallant_lab` lab-mode trajectory + in-context |
| 44 | + figures. |
| 45 | +- `assets/examples/example_review_*.png` — pages of a review `.docx`, rendered via |
| 46 | + LibreOffice → PDF → `pdftoppm`, then trimmed with ImageMagick. |
| 47 | + |
| 48 | +To refresh them, re-copy the source PNG (or re-render the `.docx`/`.xlsx`) and |
| 49 | +overwrite the file in `docs/assets/` — the filenames are referenced from the |
| 50 | +Markdown, so keep them stable. |
| 51 | + |
| 52 | +## The spreadsheet preview table |
| 53 | + |
| 54 | +The colour-coded bibliography table on the [Phases](phases.md#phase-5-build-the-spreadsheet) |
| 55 | +page is **not** a screenshot — it's HTML generated from a real `rows.json` and |
| 56 | +pulled in as a snippet (`--8<-- "docs/_includes/bib_table.html"`). To regenerate |
| 57 | +it from a different review, build an HTML `<table class="bib-preview">` with rows |
| 58 | +classed `row-search` / `row-xref` / `row-source` (the colour classes live in |
| 59 | +`docs/stylesheets/extra.css`) and overwrite `docs/_includes/bib_table.html`. That |
| 60 | +partial is excluded from the published site via `exclude_docs` in `mkdocs.yml`. |
0 commit comments