This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Static website for the United States Internet Preservation Society, built with Zola 0.23.3 (Rust-based static site generator, Tera v2 templates).
Note: Zola 0.23+ removed macros and shortcodes (Tera v2). Reusable rendering lives in templates/components/ as Tera components (e.g. {{</* filing id="HR-8250" */>}} in markdown content). Components embedded in markdown must emit flush-left HTML with no blank lines, or CommonMark converts the output into code blocks. Components are closed scopes: config is not available inside them (use load_data(path="config.toml") if needed).
# Install dependencies (first time or after package.json changes)
npm install
# TypeScript compilation
npm run build:ts # Compile TS to themes/usips/static/js/
npm run watch:ts # Watch mode for development
# Local development (compile TS first, then serve)
npm run build:ts && zola serve # Dev server at http://127.0.0.1:1111
zola serve --drafts # Include draft posts
# Building
zola build # Build to public/
zola build --drafts # Include drafts
zola build --minify # Minified HTML
# Validation
zola check # Validate build and check links
zola check --skip-external-links # Skip external link validationcontent/us/- Organization pages (mission, board, contact)content/issues/- Advocacy topicscontent/blog/- Blog postscontent/legal/- Legal documents (terms, privacy)content/support/- Support page
templates/- Tera HTML templatesbase.html- Base layoutpage.html- Standard page templateindex.html- Homepageblog.html/blog-post.html- Blog templatesmacros/- Header/footer partials (plain includes, despite the name)components/- Tera v2 components (docket entry, filing embed)
sass/- SCSS stylesheets (compiled automatically by Zola)abstracts/- Mixins and functionsbase/- Reset, typography, layoutcomponents/- Buttons, cards, forms, sociallayout/- Header, footer, navigationpages/- Home, blog, content page stylesvendors/- Third-party overrides (HubSpot)
static/- Images, fonts, PGP keys
config.toml- Main Zola config (base_url, title, theme, SASS compilation)themes/usips/theme.toml- Theme metadata
+++
title = "Page Title"
description = "Meta description"
template = "page.html"
+++For blog sections, use page_template = "blog-post.html" and sort_by = "date".
- Source:
src/ts/- TypeScript source files - Output:
themes/usips/static/js/- Compiled JS (gitignored) - Config:
tsconfig.json- Targets ES2020 modules
GitHub Actions (.github/workflows/github-pages.yml) automatically:
- Compiles TypeScript
- Builds site with Zola
- Checks HTML file sizes (14KB limit, /legal/ exempt, for TCP initial congestion window)
- Deploys to GitHub Pages
Triggers on push to master when content/, themes/, src/, config.toml, package.json, or tsconfig.json changes.