feat(docs): add the documentation site

- Astro and Starlight site in docs/ for
  https://fairrootgroup.github.io/FairMQ/
- 64 pages in eight groups: start, concepts, guides, shared memory,
  examples, tools, reference and project
- API reference and source browser from the Doxygen XML of fairmq/
- Code samples are snippets of the repository files; the build fails
  when a snippet does not match
- Option tables take the names, types and defaults from the code
- Interactive diagrams: state machine, zero-copy transfer, region
  acknowledgements, session objects, topology and channel anatomy
- The 404 page sends the URLs of the Doxygen site to the new pages
- scripts/check-pages.mjs checks pages, snippets and links without a
  build; scripts/check-links.mjs checks all links in dist/

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-05 00:17:41 +00:00
committed by Dennis Klein
parent 866f39f54e
commit 992db82b91
120 changed files with 27931 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
// Prints the API pages and their member anchors, for links from the docs pages.
// node scripts/print-api.mjs all types, namespaces and enums
// node scripts/print-api.mjs Channel only names that contain "Channel"
// node scripts/print-api.mjs Device --members with the member anchors
// Links in pages leave out the base: /api/fair/mq/Device/#ConditionalRun
import path from 'node:path';
import { getModel } from './api.mjs';
const docsDir = path.resolve(new URL('..', import.meta.url).pathname);
const m = getModel({ xmlDir: path.join(docsDir, 'build/doxygen/xml'), repoRoot: path.resolve(docsDir, '..'), base: '' });
const args = process.argv.slice(2);
const members = args.includes('--members');
const filter = args.find((a) => !a.startsWith('--'));
const show = (name) => !filter || name.includes(filter);
const out = [];
const list = (rec) => {
const seen = new Set();
for (const x of rec.visible ?? []) {
if (!x.anchor || seen.has(x.anchor)) continue;
seen.add(x.anchor);
out.push(` #${x.anchor} ${x.prot !== 'public' ? `(${x.prot}) ` : ''}${x.sigText.replace(/\s+/g, ' ')}`);
}
};
for (const ns of m.namespaces()) {
if (!show(ns.name)) continue;
out.push(`namespace ${ns.name} ${ns.url}`);
if (members) list(ns);
}
for (const t of m.types()) {
if (!show(t.name)) continue;
out.push(`${t.kind} ${t.name} ${t.url} (${t.file}:${t.line})`);
if (members) list(t);
}
for (const { e } of m.namespaceEnums()) {
if (!show(e.qualified)) continue;
out.push(`enum ${e.qualified} ${e.page}`);
if (members) for (const v of e.values) out.push(` #${v.anchor} ${v.name}${v.init ? ' ' + v.init : ''}`);
}
console.log(out.join('\n'));