Fix Jekyll build crash and clean up navbar/about page#1
Merged
Conversation
Co-authored-by: jwtoney <123672274+jwtoney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix deploy site workflow failing due to liquid exception
Fix Jekyll build crash and clean up navbar/about page
Feb 24, 2026
jwtoney
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Deploy workflow was failing with
Liquid Exception: undefined method '[]' for nil in _layouts/about.liquidbecauseannouncements: enabled: truetriggers a news section render that performs Liquid math onsite.max_width("930px"string), producingniland crashing the build.Changes
_pages/about.mdenabled: false) — fixes the build crashsubtitlewith real contentNavbar cleanup — set
nav: falseon pages the owner doesn't want exposed:_pages/repositories.md_pages/profiles.md_pages/blog.md_pages/dropdown.md(submenu with bookshelf/blog)_pages/teaching.mdNavbar will now only surface: about · publications · projects · cv.
.github/workflows/prettier.ymlalready set toworkflow_dispatchonly — no change needed.Original prompt
Problem
The "Deploy site" GitHub Actions workflow is failing on every push with this error:
This is an al-folio Jekyll theme site. The build crashes during Jekyll build. Additionally, the site has a lot of template/placeholder content that needs to be cleaned up per the owner's preferences.
Root Cause
The
_pages/about.mdfront matter hasannouncements: enabled: true, but looking at_layouts/about.liquid, the announcements section calls{% include news.liquid limit=true %}which iterates oversite.news. The_newscollection directory appears to be empty or contains template content with references that break when the about page'sannouncementssection tries to render them in the context of the layout.More importantly, looking at the
_layouts/about.liquidtemplate, line 28 has:{% capture sizes %}(min-width: {{ site.max_width }}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px) 30vw, 95vw"{% endcapture %}The
site.max_widthis set to930px(a string with "px" suffix) in_config.yml. When Liquid tries to dosite.max_width | minus: 30, it's trying to subtract 30 from "930px" which is a string, not a number. This causesnilto propagate and ultimately crashes withundefined method '[]' for nil.Required Changes
1. Fix the build error in
_config.ymlChange
max_widthfrom930pxto930pxis actually fine for CSS but causes issues in Liquid math. The real fix: ensure the profile section doesn't crash. Setannouncements: enabled: falsein_pages/about.mdsince there are no real news items, and disablelatest_postsas well.2. Clean up
_pages/about.mdCurrent file at HEAD (commit
52b3aac136e3911bc52d27779fa3bab8198b69ea):Changes needed:
subtitlefrom template placeholder to something real (e.g.,PhD Candidate, Chemical Engineering & Computational Science, MIT)announcements: enabled: false(no real news items exist)3. Remove unwanted pages from navbar
The owner does NOT want these pages: repositories, teaching, people, bookshelf, blog, or the submenu dropdown.
For each of these pages, set
nav: falsein their front matter so they don't appear in the navbar:_pages/repositories.md: Changenav: true→nav: false_pages/profiles.md(people page): Changenav: true→nav: false_pages/blog.md: Changenav: true→nav: false_pages/dropdown.md(submenu with bookshelf/blog): Changenav: true→nav: falseThe books page (
_pages/books.md) already hasnav: false, so no change needed there.4. Update
_pages/teaching.mdif it existsSearch for a teaching page and set
nav: falseon it too. It may be at_pages/teaching.mdor similar.5. Disable the Prettier workflow
Change
.github/workflows/prettier.ymlto only trigger onworkflow_dispatch(manual trigger only), removing thepushandpull_requesttriggers. Check if this was already done - if the file currently has onlyworkflow_dispatch, leave it alone.6. Clean up template placeholder content
In
_data/cv.yml, the entire file contains Albert Einstein's placeholder data. This shouldn't cause a build failure but is worth noting - leave it for now since the owner can update it later.7. Remove leftover template text from about page
The last line of
_pages/about.mdbody content says "Link to your social media connections, too. This theme is set up to use Font Awesome icons and Academicons, like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them." - this needs to be removed.Summary of files to modify
_pages/about.md- Fix subtitle, disable announcements, remove template boilerplate text_pages/repositories.md- Setnav: false_pages/profiles.md- Setnav: false_pages/blog.md- Setnav: false_pages/dropdown.md- Setnav: falsenav: false.github/workflows/prettier.yml- Ensure only manual trigger (may already be done)The goal is to get the Deploy site workfl...
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.