Static Bootstrap 4 site for the WiSE Lab, built with Hugo (migrated from Jekyll).
Modify content and push. Commits to master are built by GitHub Actions
(.github/workflows/build-hugo.yml) and rsynced to the live server.
The news list is a simple markdown block: assets/news.md.
Add a markdown file to content/projects/ with front matter:
---
title: "[title]"
image: "/img/projects/[filename]"
priority: [int]
---The body is a markdown-enabled description. Projects are listed in ascending
priority order — priority is simply the position in the list (1 = first), so
give each project a unique value. Images should be 3:2, ideally 510px × 340px, in
static/img/projects/.
Add an entry to data/team.yaml (move to
data/alumni.yaml as applicable):
- firstname: "[firstname]"
lastname: "[lastname]"
priority: [int]
title: "[title]"
affiliation: "[department/school]"
website: "[url]" # optional
image: "/img/team/[filename]" # empty string -> anon.pngImages should be square, ideally 450px × 450px, in static/img/team/.
Members are sorted first by priority, then by last name.
Add/update the BibTeX file _pubs/wise.bib and push — that's it.
The deploy workflow regenerates the publications list and the
static/bibliography/<key>.html detail pages from it automatically
(scripts/gen_bib.py).
Optional — only to preview the publications page in a local hugo server:
python3 -m venv .bibvenv && .bibvenv/bin/pip install -r scripts/requirements.txt
.bibvenv/bin/python scripts/gen_bib.pySupported custom fields (same as the old jekyll-scholar setup):
link: URL to an external reference. Displayed as(Link).pdf: URL to a PDF. Displayed as(PDF).award: Award mention, shown in red at the end of the entry.
NOTE: Tilde characters (~) in pdf/link must be escaped as \%7E.
Hugo has no BibTeX/citeproc engine, so scripts/gen_bib.py
replaces jekyll-scholar: it parses wise.bib, renders each entry in APA style via
citeproc-py + the bundled scripts/apa.csl, groups entries by
year (newest first), and emits the data + detail pages consumed by
layouts/partials/bibliography.html. Output
matches the previous jekyll-scholar rendering.
hugo.toml site config
content/ pages (_index, about, publications) + projects/
data/ team.yaml, alumni.yaml, publications.json (generated)
assets/ css/main.scss (+ bootstrap), news.md (Hugo Pipes)
static/ img/, js/, favicons, bibliography/ (generated)
layouts/ templates (baseof, partials, section/page layouts)
scripts/ gen_bib.py, apa.csl, requirements.txt
_pubs/wise.bib bibliography source
- Install the extended edition of Hugo (needed for the SCSS pipeline): https://gohugo.io/installation/
- Preview with
hugo serverat http://localhost:1313 - Build the production site into
public/withhugo --minify
The publications list is generated from
_pubs/wise.bibby the deploy workflow at build time (see Publications) — nothing to run by hand.data/publications.jsonandstatic/bibliography/are build artifacts and are git-ignored; if you want the publications page to appear in a localhugo serverpreview, generate them once (see below).