Skip to content

Include tag name in per-tag feed titles, matching category feeds - #427

Open
hikmetba-bit wants to merge 1 commit into
jekyll:masterfrom
hikmetba-bit:fix/tag-feed-title
Open

hikmetba-bit wants to merge 1 commit into
jekyll:masterfrom
hikmetba-bit:fix/tag-feed-title

Conversation

@hikmetba-bit

Copy link
Copy Markdown

Summary

Fixes #406.

Category feeds already append the category name to the feed title (site title | Category, via the {% if page.category %} block in feed.xml). Per-tag feeds (generated when feed.tags is enabled) had no equivalent — their <title> was just the bare site title, with no indication of which tag the feed is actually for.

Fix

page.tags is set by the generator (generate_tag_feed → make_page) to a single tag name string for these generated pages — the same shape as page.category. Added a Liquid block mirroring the existing category block exactly, appending the (capitalized) tag name to the title.

Testing

  • Added an assertion to the existing "should write tags feeds" spec: <title type="html">My awesome site | Test</title> for the test tag's feed.
  • Verified the new assertion fails against the code without this fix (title was just My awesome site), and passes with it.
  • Full suite: bundle exec rspec spec/ — 72 examples, 0 failures, 1 pending (pre-existing, unrelated: a validation spec skipped because libcurl isn't available on Windows).
  • bundle exec rubocop on the changed files: no offenses.

🤖 Generated with Claude Code

Category feeds already append the category name to the feed title
(site title | Category). Per-tag feeds (generated when feed.tags is
enabled) had no equivalent, so their <title> was just the bare site
title with no indication of which tag the feed is for.

page.tags is set by the generator to a single tag name string for
these pages (see generate_tag_feed/make_page), the same shape as
page.category, so the added Liquid block mirrors the existing
category block exactly.

Fixes jekyll#406.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

Tag feeds don't include tag name in title

1 participant