Source for the Tech for Equality website — a static site built with Hugo (extended) using a custom in-house theme.
- Hugo extended,
v0.162.1or newer. Prebuilt binaries: https://github.com/gohugoio/hugo/releases. On macOS:brew install hugo.
The site uses features (e.g.
.Site.Language.Locale) that require a recent Hugo. Keep your local version in sync with theHUGO_VERSIONpinned in .github/workflows/hugo.yml.
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 (team, work, contact, ...).
partials/ -> Reusable partials + components/.
themes/t4eq/ -> Legacy theme copy — NOT used for rendering (root
layouts/ and static/ take precedence).
When editing templates, styles, or scripts, edit the files under the repository root (
layouts/,static/css/main.css,static/js/main.js). The copies insidethemes/t4eq/are not used.
- Pages live in
content/as Markdown with YAML/TOML front matter. Create a new page withhugo new content content/<name>.md. - 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.
The workflow also builds (but does not deploy) on the redesign branch, so
you can confirm the build passes before merging.
A hidden staging build (the "v2" redesign) is published under a subpath so work can be reviewed before going live:
- URL: https://t4eq.org/preview/v2-july-2026/ (not linked anywhere; the
bare
/preview/path returns 404 by design). - Hosted from a separate public repository,
T4EQ/preview, which has GitHub Pages enabled with theworkflowbuild type.
You work in a single local clone with two remotes and two branches:
| Remote | Repository | Purpose |
|---|---|---|
origin |
T4EQ/T4EQ.github.io |
The main site (production, t4eq.org). |
preview |
T4EQ/preview |
The staging site (/preview/v2-july-2026/). |
redesignis the source of truth for the v2 site. All real edits (content, data, styles, templates) happen here.deploy/previewisredesignplus a few preview-only CI commits (build into a subfolder, set the subpath baseURL, enablecanonifyURLs). Its only job is to publish the staging site — you don't edit code directly on it.
redesign ──► real code, source of truth (push to origin)
│ merge into
▼
deploy/preview ──► redesign + CI tweaks (push to preview → t4eq.org/preview/)
All real editing happens on redesign; deploy/preview is only used to
publish. From the repo root:
-
Edit on
redesign:git switch redesign
Make your changes (content in
content/, data indata/, styles instatic/css/main.css, templates inlayouts/). -
Check them locally first — the local server rebuilds automatically:
hugo server --disableFastRender --noHTTPCache
Open http://localhost:1313 and confirm the change looks right.
-
Commit and back up
redesign:git add -A git commit -m "Describe what you changed" git push origin redesign -
Fold the changes into
deploy/previewand publish — merging keeps the push to the preview remote a simple fast-forward (no force-push needed):git switch deploy/preview git merge redesign git push preview deploy/preview:main
-
Wait for the build to finish (about a minute), then reload https://t4eq.org/preview/v2-july-2026/. To watch the deploy from the terminal:
gh run watch --repo T4EQ/preview --exit-status
-
Switch back to
redesignfor your next round of edits:git switch redesign
Tip: if the page looks stale, it's usually browser/CDN caching — do a hard refresh (Cmd+Shift+R) or add
?v=2to the URL.
The preview workflow differs from production in three ways:
- it builds into a
v2-july-2026/subfolder, - it sets
--baseURLto the/preview/v2-july-2026/subpath, and - it enables
HUGO_CANONIFYURLS: trueso that root-absolute asset and link paths (/css/...,/images/...,/partners/) resolve correctly under the subpath.
These preview-only settings live on the deploy/preview branch and must not be
merged into main.