Skip to content

Conversation

@KevinRSX
Copy link
Collaborator

@KevinRSX KevinRSX commented Dec 14, 2025

This PR does not change the website, including the content and style, though I plan to add another PR to improve those as well. What it does:

  • Use Jekyll, allowing a easy process to add new semesters and new meetings in a semester. The coordinator only needs to edit the header of a Markdown file, instead of handling the HTML texts, which is error-prone
  • Change the base URL to /reading-group/ and have it redirect to the current semester, which can be set in the config file, instead of /reading-group/current/
  • To change the description of a semester, e.g., the link of the signup sheet, adding the requirements of a new topic, etc., can simply edit the same Markdown file
  • The old HTMLs are currently placed in the archive/ folder

@ryanphuang I cannot test how the website looks like because GitHub Page's CI tracks only the main branch for deployment. Can you help take a look at whether these changes are plausible? Thanks!

There are too many file changes, please don't request Copilot to review this PR!

@KevinRSX KevinRSX linked an issue Dec 14, 2025 that may be closed by this pull request
@KevinRSX KevinRSX changed the title feat: Use Jekyll; style and content updates upgrade: Use Jekyll; style and content updates Dec 14, 2025
@KevinRSX KevinRSX requested a review from ryanphuang December 14, 2025 04:50
Copy link
Member

@ryanphuang ryanphuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two major changes: (1) don't use redirect; let index.html directly render the latest semester page; (2) make semesters file into collections.

Comment on lines +33 to +93
semesters:
- id: fall25
name: "Fall 2025"
active: true
- id: summer25
name: "Summer 2025"
active: false
- id: winter25
name: "Winter 2025"
active: false
- id: fall24
name: "Fall 2024"
active: false
- id: summer24
name: "Summer 2024"
active: false
- id: winter24
name: "Winter 2024"
active: false
- id: fall23
name: "Fall 2023"
active: false
- id: fall22
name: "Fall 2022"
active: false
- id: summer22
name: "Summer 2022"
active: false
- id: spring22
name: "Spring 2022"
active: false
- id: fall21
name: "Fall 2021"
active: false
- id: spring21
name: "Spring 2021"
active: false
- id: fall20
name: "Fall 2020"
active: false
- id: spring20
name: "Spring 2020"
active: false
- id: fall19
name: "Fall 2019"
active: false
- id: spring19
name: "Spring 2019"
active: false
- id: fall18
name: "Fall 2018"
active: false
- id: summer18
name: "Summer 2018"
active: false
- id: spring18
name: "Spring 2018"
active: false
- id: fall17
name: "Fall 2017"
active: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make semesters into collections to avoid this manual specification

  1. mv semesters _semesters
  2. Replace the semester config block in _config.yml with
collections:
  semesters:
    output: true
    permalink: /reading-group/:name/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this file to _includes, so it can be used to render the root index.html as well. Several changes are needed.

  1. Move the file to _includes/semester_page.html.
  2. Replace all the page.* with something like include.sem.*, e.g.,
-  <meta name="description" content="OrderLab Reading Group, {{ page.semester }}">
+  <meta name="description" content="OrderLab Reading Group, {{ include.sem.semester }}">
   <link rel="stylesheet" href="{{ site.baseurl }}/assets/css/site.css">
   <link rel="icon" type="image/vnd.microsoft.icon" href="{{ site.baseurl }}/assets/favicon.ico">
-  <title>{{ page.semester }}</title>
+  <title>{{ include.sem.semester }}</title>
  1. Update the way to loop the semesters:
-      {% for sem in site.semesters %}
-        <li{% if sem.id == page.semester_id %} class="current-semester"{% endif %}>
-          <a href="{{ site.baseurl }}/{{ sem.id }}/">{{ sem.name }}</a>
-        </li>
-      {% endfor %}
+        {% assign all_sems = site.semesters | sort: "date" | reverse %}
+        {% for sem in all_sems %}
+          <li{% if sem.url == include.sem.url %} class="current-semester"{% endif %}>
+            <a href="{{ sem.url | relative_url }}">{{ sem.semester }}</a>
+          </li>
+        {% endfor %}

This will use the tag inside the semester page, instead of the previous manual metadata in the _config.yml. It also automatically sort the semester pages by date, so make sure you add a date field in side each file.

  1. Create the _layouts/semester.html to be simply:
{% include semester_page.html sem=page %}
  1. Create another layout for the root index.html, e.g., _layouts/home.html
{% assign latest = site.semesters | sort: "date" | last %}
{% include semester_page.html sem=latest %}

This will automatically use the latest semester page.

---
layout: semester
semester_id: fall25
semester: "Fall 2025"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a date field (like 2025-08-26) for each file to support sorting and finding latest page.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use redirect for this use case. It's not a good practice. With the suggested new layout page, e.g., _layout/home.html, you just need the following for the root index.html:

---
layout: home
---

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.

Problems with current version (25/12)

3 participants