docxology-site — Workflows for danielarifriedman.com
Overview
This skill guides work on the docxology public research index site, published via GitHub Pages at https://danielarifriedman.com/. The site is a static generated-artifact repository: almost every HTML page and JSON file is generated from a source of truth and checked into git.
Key Architecture Rules
| Principle |
Detail |
| Sources over artifacts |
Edit pages/BIBLIOGRAPHY.md, pages/SOFTWARE.md, resume/source.json, etc. — never hand-edit generated files like publications.html, works/*.html, data/*.json |
| Rebuild ordering |
After editing a source, run the matching orchestrator from GENERATED.md. Order: bibliography → works/exports → domains → search → feed → sitemap |
| Volatile counts |
Never hard-code current totals in hand-authored docs. Link to reports/current_counts.md / data/current-counts.json |
| Work URLs are permanent |
works/{citation_key}.html is a permanent opaque identifier. Never re-slug an existing work — if in doubt, freeze with test_frozen_work_keys.py |
Environment
# Setup (from repo root):
uv venv --python 3.12
uv sync
# Validate generated layer (run before declaring work done):
uv run python3 code/orchestrators/validate_repo.py
# Run tests:
uv run python3 -m pytest code/tests -q
Interactive Components (added 2026-07-05)
The site now ships three interactive JavaScript modules loaded via <script defer>:
js/tts-controls.js
- Web Speech API text-to-speech with a floating control panel
- Toggle button fixed at top-right on desktop, re-positions to bottom on mobile
- Auto-collects page content from
<main> elements
- Controls: play/pause/stop, speed slider, voice selection
- Keyboard shortcut:
T to toggle TTS panel
- Respects
prefers-reduced-motion
- Persists speed/voice prefs in
sessionStorage
- Highlights the paragraph being read
- Public API:
window.__tts.speak(text), window.__tts.stop(), window.__tts.toggle()
js/interactive.js
- Reading progress bar: thin gradient bar at the top of every page
- Scroll-to-top button: appears after 300px of scrolling
- Keyboard shortcuts overlay: press
? to see all shortcuts
- Section anchor links: hover section headings to see
# copy link
- Search autocomplete: loads
search-index.json and provides live suggestions on search inputs
- Image lazy loading: adds
loading="lazy" to content images
- External link handling: adds
rel="noopener noreferrer" and target="_blank"
- Respects
prefers-reduced-motion throughout
Adding to new indexable pages
<script src="/js/tts-controls.js?v=20260712" defer></script>
<script src="/js/interactive.js?v=20260712" defer></script>
CSS
All component styles are in style.css at the end of the file:
.tts-toggle, .tts-panel, .tts-btn — TTS controls (z-index 299-300)
.reading-progress — progress bar (z-index 999)
.scroll-top, .scroll-top-visible — scroll-to-top button (z-index 290)
.shortcuts-overlay, .shortcuts-panel — keyboard shortcuts overlay (z-index 500)
.anchor-link — section heading anchors
.search-suggestions, .search-suggestion — autocomplete dropdown
.tts-highlight — highlight for content being read aloud
All components have responsive breakpoints at 860px and 480px, print styles, and reduced-motion overrides.
SEO Standards
Every indexable public page must have:
<link rel="canonical" href="https://danielarifriedman.com/...">
<meta name="robots" content="index, follow">
og:title, og:description, og:url, og:image
twitter:card, twitter:title, twitter:description, twitter:image
- JSON-LD
BreadcrumbList for navigation context
- Resource hints:
dns-prefetch for Google Fonts, prefetch for expected next pages
rel="me" for identity verification
hreflang support
dateModified / datePublished structured data
Paper-folder pages and redirect stubs are intentional SEO exceptions: they use
noindex, follow, canonicalize to their public target where applicable, and
must not emit indexable-page JSON-LD. Keep those exceptions aligned with the
SEO invariants documented in CLAUDE.md and code/src/seo_invariants.py.
Testing Interactive Components
To verify the interactive layer:
- Open any page and press
T — TTS panel should appear
- Press
? — keyboard shortcuts overlay should appear
- Scroll down — progress bar should fill, scroll-to-top button appears
- On search page — typing in search should show autocomplete suggestions
- Hover any section heading (
h2 inside a section) — anchor link # should appear
- Service worker should cache the new JS files (check Application → Service Workers in DevTools)
Pitfalls
- TTS not available:
speechSynthesis is undefined in some browsers (FireFox private mode, older browsers). The TTS module gracefully degrades — no errors.
- Service worker update: After changing cache name (
CACHE_NAME), the old cache is cleaned automatically on activate. Force-refresh clients to see new content immediately.
- Autocomplete only works on pages with
search-input class input: The MutationObserver catches dynamically added inputs.
- Section anchors: Only work on
<section> / .section elements with id attributes that contain <h2> children.
- Menu-esc script: The
/*menu-esc*/ minimal script must remain the very last <script> tag before </body> so it runs after all other scripts.
1---2name: docxology-site3description: "Maintain and extend the docxology public GitHub Pages static site (danielarifriedman.com)"4version: "1.0.0"5tags:6 - github-pages7 - static-site8 - seo9 - accessibility10 - tts11category: web-development12metadata:13 source: https://skillmd.com/skills/docxology/docxology-site14---1516# docxology-site — Workflows for danielarifriedman.com1718## Overview1920This skill guides work on the [docxology](https://github.com/docxology/docxology) public research index site, published via GitHub Pages at `https://danielarifriedman.com/`. The site is a **static generated-artifact repository**: almost every HTML page and JSON file is generated from a source of truth and checked into git.2122## Key Architecture Rules2324| Principle | Detail |25|-----------|--------|26| **Sources over artifacts** | Edit `pages/BIBLIOGRAPHY.md`, `pages/SOFTWARE.md`, `resume/source.json`, etc. — never hand-edit generated files like `publications.html`, `works/*.html`, `data/*.json` |27| **Rebuild ordering** | After editing a source, run the matching orchestrator from `GENERATED.md`. Order: bibliography → works/exports → domains → search → feed → sitemap |28| **Volatile counts** | Never hard-code current totals in hand-authored docs. Link to `reports/current_counts.md` / `data/current-counts.json` |29| **Work URLs are permanent** | `works/{citation_key}.html` is a permanent opaque identifier. Never re-slug an existing work — if in doubt, freeze with `test_frozen_work_keys.py` |3031## Environment3233```bash34# Setup (from repo root):35uv venv --python 3.1236uv sync3738# Validate generated layer (run before declaring work done):39uv run python3 code/orchestrators/validate_repo.py4041# Run tests:42uv run python3 -m pytest code/tests -q43```4445## Interactive Components (added 2026-07-05)4647The site now ships three interactive JavaScript modules loaded via `<script defer>`:4849### `js/tts-controls.js`50- Web Speech API text-to-speech with a floating control panel51- Toggle button fixed at **top-right** on desktop, re-positions to bottom on mobile52- Auto-collects page content from `<main>` elements53- Controls: play/pause/stop, speed slider, voice selection54- Keyboard shortcut: `T` to toggle TTS panel55- Respects `prefers-reduced-motion`56- Persists speed/voice prefs in `sessionStorage`57- Highlights the paragraph being read58- Public API: `window.__tts.speak(text)`, `window.__tts.stop()`, `window.__tts.toggle()`5960### `js/interactive.js`61- **Reading progress bar**: thin gradient bar at the top of every page62- **Scroll-to-top button**: appears after 300px of scrolling63- **Keyboard shortcuts overlay**: press `?` to see all shortcuts64- **Section anchor links**: hover section headings to see `#` copy link65- **Search autocomplete**: loads `search-index.json` and provides live suggestions on search inputs66- **Image lazy loading**: adds `loading="lazy"` to content images67- **External link handling**: adds `rel="noopener noreferrer"` and `target="_blank"`68- Respects `prefers-reduced-motion` throughout6970### Adding to new indexable pages71```html72<script src="/js/tts-controls.js?v=20260712" defer></script>73<script src="/js/interactive.js?v=20260712" defer></script>74```7576### CSS77All component styles are in `style.css` at the end of the file:78- `.tts-toggle`, `.tts-panel`, `.tts-btn` — TTS controls (z-index 299-300)79- `.reading-progress` — progress bar (z-index 999)80- `.scroll-top`, `.scroll-top-visible` — scroll-to-top button (z-index 290)81- `.shortcuts-overlay`, `.shortcuts-panel` — keyboard shortcuts overlay (z-index 500)82- `.anchor-link` — section heading anchors83- `.search-suggestions`, `.search-suggestion` — autocomplete dropdown84- `.tts-highlight` — highlight for content being read aloud8586All components have responsive breakpoints at 860px and 480px, print styles, and reduced-motion overrides.8788## SEO Standards8990Every indexable public page must have:91- `<link rel="canonical" href="https://danielarifriedman.com/...">`92- `<meta name="robots" content="index, follow">`93- `og:title`, `og:description`, `og:url`, `og:image`94- `twitter:card`, `twitter:title`, `twitter:description`, `twitter:image`95- JSON-LD `BreadcrumbList` for navigation context96- Resource hints: `dns-prefetch` for Google Fonts, `prefetch` for expected next pages97- `rel="me"` for identity verification98- `hreflang` support99- `dateModified` / `datePublished` structured data100101Paper-folder pages and redirect stubs are intentional SEO exceptions: they use102`noindex, follow`, canonicalize to their public target where applicable, and103must not emit indexable-page JSON-LD. Keep those exceptions aligned with the104SEO invariants documented in `CLAUDE.md` and `code/src/seo_invariants.py`.105106## Testing Interactive Components107108To verify the interactive layer:1091. Open any page and press `T` — TTS panel should appear1102. Press `?` — keyboard shortcuts overlay should appear1113. Scroll down — progress bar should fill, scroll-to-top button appears1124. On search page — typing in search should show autocomplete suggestions1135. Hover any section heading (`h2` inside a section) — anchor link `#` should appear1146. Service worker should cache the new JS files (check Application → Service Workers in DevTools)115116## Pitfalls117118- **TTS not available**: `speechSynthesis` is undefined in some browsers (FireFox private mode, older browsers). The TTS module gracefully degrades — no errors.119- **Service worker update**: After changing cache name (`CACHE_NAME`), the old cache is cleaned automatically on `activate`. Force-refresh clients to see new content immediately.120- **Autocomplete only works on pages with `search-input` class input**: The MutationObserver catches dynamically added inputs.121- **Section anchors**: Only work on `<section>` / `.section` elements with `id` attributes that contain `<h2>` children.122- **Menu-esc script**: The `/*menu-esc*/` minimal script must remain the very last `<script>` tag before `</body>` so it runs after all other scripts.