Skip to content

fix: valid feed.xml output, repoint /python-lectures/ redirect to /lectures/#208

Merged
mmcky merged 1 commit into
mainfrom
fix/feed-xml-and-projects-redirect
Jun 10, 2026
Merged

fix: valid feed.xml output, repoint /python-lectures/ redirect to /lectures/#208
mmcky merged 1 commit into
mainfrom
fix/feed-xml-and-projects-redirect

Conversation

@mmcky

@mmcky mmcky commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes two pre-existing bugs discovered while verifying the GitHub Actions deploy migration (#199). Neither was a regression — both pre-date the deployment switch.

1. feed.xml produced invalid XML

The template rendered post descriptions with {{ post.content | escape | truncate: '400' }}. Truncating after escaping slices XML entities in half (e.g. "&quo), so the live feed failed XML validation with ~10 parser errors.

Fix: reorder to {{ post.content | strip_html | truncate: 400 | escape }} — truncate plain text first, escape last. strip_html also removes markup that previously appeared escaped inside descriptions, so readers get clean text summaries.

Verified: xmllint --noout _site/feed.xml passes on a JEKYLL_ENV=production build.

2. /python-lectures/ redirected to a page that has never existed

pages/python-lectures.md had redirect_to: https://quantecon.org/projects/#filter=lecture, but /projects/ 404s and is absent from the sitemap both before and after the deploy migration — the filterable projects page it pointed at was never shipped. Visitors following the redirect landed on a 404.

Fix: point it at /lectures/, where the lecture series are listed today.

🤖 Generated with Claude Code

Two pre-existing bugs found while verifying the GitHub Actions deploy
migration (#199):

- feed.xml truncated post content *after* escaping it, slicing XML
  entities like " in half and producing an invalid feed. Reorder
  to strip_html | truncate | escape so truncation happens on plain
  text and escaping is applied last.

- /python-lectures/ redirected to /projects/#filter=lecture, a page
  that has never existed (404). Point it at /lectures/, where the
  lecture series are listed today.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 10, 2026 00:28
@netlify

netlify Bot commented Jun 10, 2026

Copy link
Copy Markdown

Deploy Preview for grand-swan-ca5201 ready!

Name Link
🔨 Latest commit 6990faa
🔍 Latest deploy log https://app.netlify.com/projects/grand-swan-ca5201/deploys/6a28afa8ff117b0008b7e89c
😎 Deploy Preview https://deploy-preview-208--grand-swan-ca5201.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes two pre-existing site issues uncovered during the GitHub Pages Actions deploy migration: invalid RSS feed XML output and a broken /python-lectures/ redirect target.

Changes:

  • Update feed.xml to strip HTML and truncate before escaping to avoid truncation splitting escape sequences and producing invalid XML.
  • Repoint /python-lectures/ redirect from a non-existent /projects/ page to the existing /lectures/ page.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pages/python-lectures.md Redirects /python-lectures/ to /lectures/ instead of the non-existent /projects/ route.
feed.xml Reorders Liquid filters to produce valid RSS description text (strip HTML → truncate → escape).

@mmcky mmcky merged commit 514646e into main Jun 10, 2026
6 checks passed
@mmcky mmcky deleted the fix/feed-xml-and-projects-redirect branch June 10, 2026 00:32
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.

2 participants