Source for the Tech for Equality website — a static site built with Hugo (extended), with all templates and styles hand-built in this repository (no external theme).
- Hugo extended,
v0.163.3or newer. Prebuilt binaries: https://github.com/gohugoio/hugo/releases. On macOS:brew install hugo. With nix:nix develop.
Serve the site with live reload at http://localhost:1313:
hugo server --disableFastRender --noHTTPCacheProduce a production build into public/:
hugo --minifyhugo.toml -> Site configuration (baseURL, menus, params).
content/ -> Page content and front matter (Markdown).
data/ -> Structured data (team.yaml, services.yaml).
static/ -> Assets served as-is:
css/main.css -> The single active stylesheet.
js/main.js -> Site JavaScript (nav, contact form).
images/ -> Logos, team photos, mockups.
layouts/ -> The ACTIVE templates that render the site:
_default/ -> Per-page templates (about, team, contact, ...), plus
list.html/taxonomy.html as generic fallbacks for any
section or tag/category page without a dedicated one.
blog/ -> Blog list + single post templates.
partials/ -> Reusable partials + components/.
- Pages live in
content/as Markdown with YAML/TOML front matter. Create a new page withhugo new content content/<name>.md. - Blog posts live in
content/blog/as Markdown. Create one withhugo new content blog/<slug>.md— this scaffolds the front matter (title,date,summary,deck,hero_image,author) from archetypes/blog.md. Setdraft: falseto publish. The post body is regular Markdown. The listing at/blog/is generated automatically (newest first, paginated) by layouts/blog/list.html and layouts/blog/single.html. - Team members are defined in data/team.yaml.
- Services are defined in data/services.yaml.
- Navigation and footer menus are configured in the
[menu]section of hugo.toml.
The production site is published to GitHub Pages and served at https://t4eq.org.
Deployment is automated by .github/workflows/hugo.yml:
- Open a pull request with your changes and get it reviewed.
- Merge into the
mainbranch. - On push to
main, the workflow builds the site withhugo --minifyand deploys it to GitHub Pages viaactions/deploy-pages.
Every branch pushed to this repo (other than main) is automatically built
and published at:
https://t4eq.org/preview/<branch-name>/
This is handled entirely by .github/workflows/hugo.yml:
- On every push to a non-
mainbranch, the workflow builds the site with drafts enabled (hugo -D) and a--baseURLscoped to that branch's subpath, then publishes the result to the<branch-name>/directory of the separateT4EQ/previewrepository (overwriting whatever was there before). - When a branch is deleted, the workflow removes its
<branch-name>/directory fromT4EQ/preview.
T4EQ/preview holds nothing but the built HTML/CSS/JS output
for each active branch — it has no source files, no build logic, and no workflow
of its own. GitHub Pages serves it directly (branch-based / legacy Pages source),
so previews persist for as many branches as are currently open, with no manual
steps and no separate branch to maintain in this repo.
There's nothing to do locally to get a preview — just push your branch. To test the exact preview build yourself before pushing:
HUGO_CANONIFYURLS=true nix develop --command hugo --minify -D \
--baseURL "https://t4eq.org/preview/$(git branch --show-current)/" \
--environment preview \
--destination /tmp/preview-buildPublishing to T4EQ/preview requires the PREVIEW_DEPLOY_KEY
repository secret (an SSH deploy key with write access to
T4EQ/preview) to be configured on this repo.