lukaszlenart opened a new pull request, #317:
URL: https://github.com/apache/struts-site/pull/317
## Problem
`source/.htaccess` hardcoded the legacy `/announce.html` redirect to
`/announce-2024.html`, so visitors landed on the 2024 announcements even though
`announce-2025.md` and `announce-2026.md` exist. The line has to be bumped by
hand every January and was missed twice.
## Fix
`.htaccess` now carries empty front matter so Jekyll renders Liquid in it,
and the redirect target is resolved from the newest `announce-*` page at build
time:
```
{% assign announcements = site.pages | where_exp: "page", "page.path
contains 'announce-'" | sort: "path" -%}
RedirectMatch \/announce.html(#a[0-9]+)? {{ announcements.last.url }}$1
```
Adding `source/announce-YYYY.md` for a new year is now enough — the redirect
follows automatically. `CLAUDE.md` and the `announcing-struts-release` skill
were updated to drop the manual step.
## Verification
Built with Jekyll 4.2 in a scratch site seeded with all 25 real `announce-*`
filenames (2002 `.html` … 2026 `.md`). Rendered output:
```
# always points to the most recent announce-YYYY page, no manual update
needed
RedirectMatch \/announce.html(#a[0-9]+)? /announce-2026.html$1
```
The rest of the file is byte-identical to before.
Note: old bookmarks of the form `/announce.html#a1234` still carry their
anchor through and won't resolve on the year page — those anchors only ever
existed on the retired single-page announcements. That was already the case
before this change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]