Skip to content

Fix template defects, remove dead weight, make builds reproducible - #39

Merged
sbryngelson merged 2 commits into
sourcefrom
fix/phase-1-cleanup
Sep 6, 2026
Merged

sbryngelson merged 2 commits into
sourcefrom
fix/phase-1-cleanup

Conversation

@sbryngelson

Copy link
Copy Markdown
Owner

Summary

Phase 1 of the template cleanup: correctness fixes, dead-weight removal, reproducible builds and CI. No intentional visual redesign; the only visible changes are the contrast corrections and the fixed favicon fallback.

Bugs fixed (verified on the live demo)

  • Site search was broken on any sub-path site, including the demo (hardcoded /assets/search.json). Now baseurl-aware.
  • Search index leaked raw Liquid/Markdown (render-order bug in the Liquid template). Now generated post-render by _plugins/search_index.rb; posts are indexed too.
  • Sitemap listed no pages (sitemap: false everywhere). Fixed.
  • dark_mode: false did nothing (Liquid default treats false as unset). Fixed.
  • Name bolding did not exist; README pointed at a non-existent Jekyll Scholar feature. Implemented generically in bibtemplate.html from scholar.last_name / scholar.first_name.
  • Dark-mode contrast failures (2.3-2.8:1 on chips and badges): the inline accent_color style overrode the dark accent. Accent variants are now derived with color-mix(); muted text and on-accent text corrected. Lighthouse a11y 100 on every page (was 93-95).
  • Heading-order skips on team/research/software and in the footer.
  • Blog permalinks (/lecture/notes/1961/... -> /blog/1961/space-time/); /blogs/ -> /blog/.
  • {{ site.url }}{{ site.baseurl }} everywhere -> relative_url / absolute_url.
  • Stale favicon.ico (old infinity logo) shown by Safari and older browsers. Removed; deploy rasterizes ICO + Apple touch icon from the generated SVG.

Removed

Unreferenced Popper package (2.3 MB, deployed to every fork's site), bootstrap sourcemap, bootstrap_bak.scss, Rakefile, CNAME placeholder, six duplicate layouts, dead config keys, npm/esbuild build step, _config_demo.yml. README/UPGRADING/setup.sh/screenshots no longer ship in _site.

Added

  • Gemfile.lock committed; Jekyll 4.4.1; Ruby 3.4 in CI; actions/checkout@v7.
  • url/baseurl derived from actions/configure-pages at deploy time (user sites, project sites, custom domains all just work; kills the _config_demo.yml trap from cannot show any head #36/cannot show any head #37).
  • ci.yml: build + html-proofer on every PR.
  • Dependabot (actions + bundler); issue template for build problems.
  • README: "Use this template" instead of fork, corrected setup steps, custom-domain flow via Settings.

Verification

  • Local acceptance script covering each defect above passes for both a root-served build and a /academic-website-template base-path build.
  • Lighthouse (local build): accessibility 100 on home, publications, team, research, software, about; best-practices 100.
  • _site shrinks from 17 MB to under 12 MB.
  • CI on this PR exercises the new workflow steps (favicon rasterization, html-proofer).

Follow-ups (separate PRs)

Phase 2: self-hosted fonts, SVG icon sprite, drop Bootstrap JS, MathJax opt-in (page weight / independence). Phase 3: talks/teaching/software as YAML data, richer publication fields, selected publications, setup.sh --clean.

Bugs fixed (all verified against the live demo before/after):
- Site search fetched /assets/search.json from the domain root, so it
  failed on every site served from a sub-path, including the demo. The
  layout now exposes site.baseurl on <body> and the script uses it.
- The search index was a Liquid template that read page.content before
  some pages had rendered, leaking raw {{ tags }} and Markdown. It is now
  generated by a small post-render plugin from the rendered HTML, and
  blog posts are indexed too.
- Every page set sitemap: false, so sitemap.xml contained only two posts
  and three PDFs. Pages are now listed; 404 is still excluded.
- dark_mode: false had no effect because Liquid's default filter treats
  false as unset. Both the pre-paint script and the toggle now check for
  == false explicitly.
- README claimed scholar.last_name/first_name bold your name; Jekyll
  Scholar has no such feature and the only hook was a commented-out line
  hardcoded to a specific name. bibtemplate.html now bolds the configured
  name generically.
- The inline accent color from _config.yml overrode the dark-mode accent,
  giving 2.3-2.8:1 contrast on chips and year badges. All accent variants
  are now derived from one --accent-base with color-mix(), text on solid
  accent uses --on-accent, and --text-muted was raised in both modes.
  Lighthouse accessibility is 100 on every page (was 93-95).
- Card titles skipped heading levels (h2 -> h4); footer used h5.
- Blog posts were published at /lecture/notes/1961/... because the
  category contained a space. Posts now use /blog/:year/:title/ and the
  index moved from /blogs/ to /blog/.
- Hardcoded {{ site.url }}{{ site.baseurl }} links are replaced by
  relative_url / absolute_url, so local preview works when url is set.
- favicon.ico was a leftover logo unrelated to the generated initials
  SVG; Safari and older browsers showed it. It is removed from the repo
  and the deploy workflow rasterizes favicon.ico and apple-touch-icon.png
  from favicon.svg so all fallbacks match.

Removed:
- assets/javascript/popper (2.3 MB, unreferenced; Popper ships inside
  bootstrap.bundle.min.js), the bootstrap sourcemap, bootstrap_bak.scss,
  Rakefile (force-pushed to a personal repo), CNAME placeholder, six
  identical layouts (collapsed into page.html), dead _config.yml entries,
  package.json/esbuild and site.min.js (site.js is served directly), and
  _config_demo.yml.
- README.md, UPGRADING.md, setup.sh, LICENSE and README screenshots are
  no longer published to the site.

Added / changed:
- Gemfile.lock is committed for reproducible builds; Jekyll 4.4, Ruby 3.4
  in CI (3.2 is end-of-life), actions/checkout v7.
- The deploy workflow reads url/baseurl from actions/configure-pages, so
  user sites, project sites and custom domains all build correctly
  without editing _config.yml or a demo override file.
- ci.yml builds every pull request with --strict_front_matter and runs
  html-proofer on the output.
- Dependabot for GitHub Actions and Bundler; an issue template for build
  problems that asks for the repo link and Actions log.
- README recommends "Use this template" over forking (clean history, no
  upstream baggage, private repos possible) and documents the one-time
  Pages source setting and custom-domain flow. UPGRADING.md lists the
  changes for existing users.
@sbryngelson
sbryngelson merged commit 4a28f09 into source Sep 6, 2026
1 check passed
@sbryngelson
sbryngelson deleted the fix/phase-1-cleanup branch September 6, 2026 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant