app/routes/systems[.md].ts
21 lines and 1 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.
Functions
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| loader | 13 to 24 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
Imports
It imports app/lib/markdown-twin.ts, app/lib/seo.ts, app/lib/systems.mjs. No module of this repo imports it.
Source
import { canonicalLink } from "~/lib/markdown-twin";
import { SHARED_CACHE_CONTROL, SITE_ORIGIN, publicHtmlHeaders } from "~/lib/seo";
import { SYSTEMS_PATH, loadSystemModel, systemsMarkdown } from "~/lib/systems.mjs";
import rawModel from "../../data/system-model.json";
const MODEL = loadSystemModel(rawModel);
/**
* The markdown twin of /systems, drawn from the same model as the page and holding every system's
* facts, so an agent reads what a person does.
*/
export function loader() {
return new Response(systemsMarkdown(MODEL, SITE_ORIGIN), {
headers: {
"content-type": "text/markdown; charset=utf-8",
"cache-control": SHARED_CACHE_CONTROL,
// The page's own tag, so one purge reaches the page and its twin.
"cache-tag": publicHtmlHeaders()["Cache-Tag"],
"x-robots-tag": "noindex",
link: canonicalLink(SYSTEMS_PATH),
},
});
}