phormasci.github.io: convert runtime markdown loading to build-time
static generation + CI integration
Log
Session:17:52
(phormasci.github.io)
Replaced runtime content loading with build-time rendering: deleted
js/content-loader.js, added zero-dep
scripts/build.js (auto-discovers content/**.md
per language, sorts by frontmatter order, injects semantic
HTML between <!-- build:start/end --> markers,
generates schema.org JSON-LD for services/trainees/team)
Regenerated all 10 pages (en/es) with static accessible markup:
<article> cards, h1→h2→h3, anchor IDs from titles,
HTML-escaped text (allowlisted br/strong for
mission hero)
Rule of 5 review surfaced CI integration gaps → added
.github/workflows/build-check.yml (PRs touching content
must commit regenerated HTML via build +
git diff --exit-code), build steps in
static.yml and pr-preview.yml (+
scripts/build.js path trigger)
Added just check recipe (mirrors CI), fixed broken
just validate (graceful tidy skip), documented build system
in README/AGENTS.md/CLAUDE.md
PR #22 created, merged to main; build-check ✅;
production phorma.sh verified live: 9 service cards + 13 trainee cards +
JSON-LD all served statically, zero runtime loader references
Diagnosed deployment topology: GH Actions deploys to GitHub Pages,
but phorma.sh DNS → Cloudflare Pages (phorma-sh project)
which only updates via manual just deploy (wrangler). User
ran it manually; production verified correct.
Next: deploy-preview workflow still broken since
2025-12 (expired PREVIEW_REPO_TOKEN for
pr-site-preview repo); consider Cloudflare auto-deploy via
wrangler-action + CLOUDFLARE_API_TOKEN in
static.yml so merges ship to production directly
Tasks created
Decisions
Build-time rendering over SSGs: kept zero-dependency static
architecture (marker-based injection into committed HTML) instead of
introducing a framework — matches site philosophy
Auto-discovery of markdown files by order frontmatter
instead of hardcoded file lists
JSON-LD emitted inline per page (services/courses/team) for machine
parseability
Verificada grabación de hoy: timer systemd user
download-stream.timer (jue 18:45, 1h30m) estaba trabado
(Trigger: n/a) → reenable + restart lo
arregló; próximo disparo hoy 18:45 ✓
Nuevo just check-stream-timer +
scripts/check-stream-timer: detecta timer sin próximo
trigger y lo resetea; doc en docs/workflow-programa.org +
tabla AGENTS.md
EPUB: build-epub.mjs migrado de marked +
epub-gen a pandoc directo (adiós dep
epub-gen). Output limpio: título + contenido, sin bloque
.epub-meta (género/licencia/fecha)
PDF grillas: build-show.mjs ahora usa
scripts/print-style.css dedicado (antes
resources/style.css metía
header/nav/breadcrumb/live-banner/borders del sitio).
--standalone para conservar título; autor/fecha
ocultos
CSS de build movidos a scripts/ (squint copia
resources/*.css a dist/ — habría contaminado
el site)
CI (deploy.yml): instala pandoc +
weasyprint → EPUB y PDF se generan en el deploy; site solo
sirve estáticos. Downloads links sin cambios (mismos paths)
Next: confirmar que el CI run post-push pasa el
install de pandoc/weasyprint (push ~17:50); verificar grabación ~19:00
(just check-stream-timer, archivo en
materiales/grabaciones/)
Session:20:36
(el-mundo-ha-vivido-equivocado — fix stale stream)
Detectado que la grabación del programa de hoy (19:00-20:15) no se
grabó por una instancia stale: el ffmpeg del 27/8 terminó a las 21:22
pero el wrapper bash quedó "activating", impidiendo systemd de arrancar
uno nuevo hoy
Fix en scripts/download-stream:
pkill -x ffmpeg al inicio, mata cualquier instancia previa
antes de grabar
Fix en scripts/check-stream-timer: detecta si el
servicio lleva >4h activo y limpia automáticamente
Commiteado + pusheado: 26666d9
Next: jueves 10/9 a las 18:45 debería grabar sin
problemas; verificar con just check-stream-timer
El archivo parcial de prueba (5m) no se va a la grabación real —
borrar.