Mirror the auto-indexed per-host pattern for a new docs/services/ category, seeded with the six things currently deployed on or around makerfloss.eu: docs, slides, forgejo, gandi-dns, marp, mermaid. Generator/hook generalisation: - scripts/gen_overview.py: replace the hardcoded `hostname` check with a configurable `key_field` (default: hostname). Add a generic `key-link` column kind (replaces the old `hostname-link`) and a `url-link` kind that renders the value as a clickable link. - scripts/overview_config.yml: declare hardware's key_field, then add a `services` block (key_field=name, its own kind/status enums, grouped by kind for the index table). - scripts/mkdocs_hooks.py: route by `page.file.src_uri` so each hardware/* page gets a "Specs" table and each services/* page gets a "Service" table; both share the helpers in gen_overview. Wiring: - Makefile: docs-index and docs-check now regenerate and drift-check both indices. - .forgejo/workflows/docs.yml: same on the CI runner. - mkdocs.yml: add Services to nav. - README.md, CLAUDE.md: list services/ in the repo-layout block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
68 lines
2 KiB
YAML
68 lines
2 KiB
YAML
# Configuration for scripts/gen_overview.py
|
|
#
|
|
# Each top-level key is a category. The generator is invoked with
|
|
# --category <name> and looks up its block here. To add a new category
|
|
# (services, vms, ...) later, copy a block and adjust the fields.
|
|
|
|
hardware:
|
|
title: "Hardware Overview"
|
|
source_dir: docs/hardware
|
|
output_file: docs/hardware/index.md
|
|
key_field: hostname
|
|
required_fields:
|
|
- hostname
|
|
- kind
|
|
- status
|
|
enums:
|
|
kind: [server, laptop, sbc, switch, ap, desktop]
|
|
status: [in-use, staging, spare, broken, donated]
|
|
storage_type: [nvme, ssd, hdd, mixed]
|
|
group_by: kind
|
|
# Human-friendly H2 names per group_by value. Anything missing falls back
|
|
# to the raw value title-cased + "s".
|
|
group_titles:
|
|
server: Servers
|
|
laptop: Laptops
|
|
sbc: Single-board computers
|
|
switch: Switches
|
|
ap: Access points
|
|
desktop: Desktops
|
|
sort_by: hostname
|
|
columns:
|
|
- { header: Hostname, kind: key-link, field: hostname }
|
|
- { header: Model, field: model }
|
|
- { header: Location, field: location }
|
|
- { header: CPU, kind: cpu }
|
|
- { header: RAM, kind: ram }
|
|
- { header: Storage, kind: storage }
|
|
- { header: NIC, kind: nic }
|
|
- { header: Status, field: status }
|
|
|
|
services:
|
|
title: "Services Overview"
|
|
source_dir: docs/services
|
|
output_file: docs/services/index.md
|
|
key_field: name
|
|
required_fields:
|
|
- name
|
|
- kind
|
|
- status
|
|
enums:
|
|
kind: [web-app, static-site, dns, slide-builder, library, reverse-proxy, mail]
|
|
status: [in-use, staging, planned, broken, decommissioned]
|
|
group_by: kind
|
|
group_titles:
|
|
web-app: Web applications
|
|
static-site: Static sites
|
|
dns: DNS
|
|
slide-builder: Slide builders
|
|
library: Libraries
|
|
reverse-proxy: Reverse proxies
|
|
mail: Mail
|
|
sort_by: name
|
|
columns:
|
|
- { header: Name, kind: key-link, field: name }
|
|
- { header: URL, kind: url-link, field: url }
|
|
- { header: Host, field: host }
|
|
- { header: Tech, field: tech }
|
|
- { header: Status, field: status }
|