feat: convert workshops to a Jekyll collection#204
Open
mmcky wants to merge 1 commit into
Open
Conversation
Replaces hardcoded HTML in pages/workshops.md and _layouts/home.html with a Jekyll collection (_workshops/) so both locations stay in sync automatically when a new workshop is added. Changes: - _config.yml: add 'workshops' collection (output: false) - _workshops/: 28 workshop data files (YYYY-MM-DD-slug.md) with front matter fields: title, location, date, year, presenters, repo_url, description (optional) - pages/workshops.md: rewritten as a Liquid template; recent workshops (year >= 2024) shown with full details, past workshops grouped by year in Bootstrap accordion sorted descending - _layouts/home.html: hardcoded 5-item list replaced with Liquid loop over site.workshops sorted by date desc, limit 5 Adding a new workshop now requires only a single file in _workshops/. Closes #197
✅ Deploy Preview for grand-swan-ca5201 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates workshop content from hardcoded HTML into a dedicated Jekyll collection (_workshops/), so the homepage “Recent Workshops” section and the /workshops/ page can both render from a single source of truth.
Changes:
- Added a
workshopscollection in_config.ymland introduced_workshops/Markdown front-matter entries for each workshop. - Rewrote
pages/workshops.mdto render “Recent” vs “Past” workshops via Liquid, including a year-grouped accordion for past workshops. - Updated
_layouts/home.htmlto populate the homepage “Recent Workshops” list via a Liquid loop oversite.workshops.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
_config.yml |
Registers the workshops collection for use in Liquid templates. |
_layouts/home.html |
Replaces hardcoded homepage workshop list with a dynamic Liquid loop. |
pages/workshops.md |
Replaces hardcoded workshops page content with Liquid-driven rendering/grouping. |
_workshops/2016-05-01-chicago-federal-reserve.md |
Adds workshop collection entry (data). |
_workshops/2016-06-01-econometric-society.md |
Adds workshop collection entry (data). |
_workshops/2016-10-01-university-of-economics-ho-chi-minh-city.md |
Adds workshop collection entry (data). |
_workshops/2017-03-01-rba-rbnz.md |
Adds workshop collection entry (data). |
_workshops/2017-06-01-university-of-chicago.md |
Adds workshop collection entry (data). |
_workshops/2017-08-01-anu-ams.md |
Adds workshop collection entry (data). |
_workshops/2017-09-01-us-phd-workshops.md |
Adds workshop collection entry (data). |
_workshops/2018-03-01-anu-honours-workshop.md |
Adds workshop collection entry (data). |
_workshops/2018-05-01-university-of-copenhagen.md |
Adds workshop collection entry (data). |
_workshops/2019-04-01-department-of-industry-innovation-and-science.md |
Adds workshop collection entry (data). |
_workshops/2022-07-01-research-school-of-economics-anu.md |
Adds workshop collection entry (data). |
_workshops/2022-09-01-crest-paris.md |
Adds workshop collection entry (data). |
_workshops/2022-09-15-central-bank-of-chile.md |
Adds workshop collection entry (data). |
_workshops/2023-04-01-keio-university.md |
Adds workshop collection entry (data). |
_workshops/2023-04-10-nagoya-university.md |
Adds workshop collection entry (data). |
_workshops/2023-04-15-kobe-university.md |
Adds workshop collection entry (data). |
_workshops/2023-10-01-columbia-university.md |
Adds workshop collection entry (data). |
_workshops/2023-10-15-international-monetary-fund.md |
Adds workshop collection entry (data). |
_workshops/2024-03-01-international-monetary-fund.md |
Adds workshop collection entry (data). |
_workshops/2024-05-01-central-bank-of-chile.md |
Adds workshop collection entry (data). |
_workshops/2024-08-01-university-of-melbourne.md |
Adds workshop collection entry (data). |
_workshops/2024-11-01-reserve-bank-of-australia.md |
Adds workshop collection entry (data). |
_workshops/2025-06-01-international-university-of-japan.md |
Adds workshop collection entry (data). |
_workshops/2025-06-15-kyoto-university.md |
Adds workshop collection entry (data). |
_workshops/2025-09-01-hitotsubashi-university.md |
Adds workshop collection entry (data). |
_workshops/2025-10-01-bank-of-portugal.md |
Adds workshop collection entry (data). |
_workshops/2025-12-01-international-monetary-fund.md |
Adds workshop collection entry (data). |
_workshops/2026-02-01-international-university-of-japan.md |
Adds workshop collection entry (data). |
Comment on lines
23
to
26
| <ul> | ||
| <li><span>Presenters:</span> John Stachurski</li> | ||
| <li><a href="https://github.com/QuantEcon/rba_workshop_2024">The AI-driven Revolution in Scientific Computing</a></li> | ||
| <li><span>Presenters:</span> {{ workshop.presenters }}</li> | ||
| {% if workshop.repo_url %}<li><a href="{{ workshop.repo_url }}">{{ workshop.title }}</a></li>{% endif %} | ||
| </ul> |
Comment on lines
55
to
58
| <ul> | ||
| <li><span>Presenters:</span> John Stachurski</li> | ||
| <li><a href="https://github.com/QuantEcon/rse_comp_econ_2022">Website</a></li> | ||
| <li><span>Presenters:</span> {{ workshop.presenters }}</li> | ||
| {% if workshop.repo_url %}<li><a href="{{ workshop.repo_url }}">{{ workshop.title }}</a></li>{% endif %} | ||
| </ul> |
Comment on lines
+12
to
+15
| {% assign all_workshops = site.workshops | sort: "date" | reverse %} | ||
| {% assign recent_workshops = all_workshops | where_exp: "w", "w.year >= 2024" %} | ||
| {% assign past_workshops = all_workshops | where_exp: "w", "w.year < 2024" %} | ||
| {% assign past_years = past_workshops | map: "year" | uniq %} |
Comment on lines
+14
to
+15
| {% assign past_workshops = all_workshops | where_exp: "w", "w.year < 2024" %} | ||
| {% assign past_years = past_workshops | map: "year" | uniq %} |
| --- | ||
| title: "Computational Economics Workshop" | ||
| location: "University of Chicago, Becker Friedman Institute" | ||
| date: "2017-06-01" |
4 tasks
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.
Summary
Converts workshops from hardcoded HTML in two separate files into a Jekyll collection, so adding a new workshop requires editing exactly one file.
Problem
Previously, adding a workshop meant updating two places manually:
pages/workshops.md— the full workshops page_layouts/home.html— the hardcoded "Recent Workshops" list on the homepageSolution
Introduced a
_workshops/Jekyll collection (similar to_lectures/and_projects/).Changes
_config.ymlAdded
workshopscollection withoutput: false(no individual pages generated)._workshops/— 28 new data filesEach workshop is a markdown file named
YYYY-MM-DD-slug.mdwith front matter:pages/workshops.mdRewritten as a Liquid template:
year >= 2024): sorted newest-first, shown with full details (presenters, link, description)year < 2023): grouped by year in a Bootstrap accordion, sorted newest-first, first year expanded_layouts/home.htmlHardcoded 5-item list replaced with a Liquid loop:
{% assign recent_workshops = site.workshops | sort: "date" | reverse %} {% for workshop in recent_workshops limit:5 %}Verified
bundle exec jekyll buildpasses cleanlyAdding a new workshop (going forward)
Create a single file
_workshops/YYYY-MM-DD-slug.md— the homepage and workshops page both update automatically on the next build.Closes #197