Conversation
There was a problem hiding this comment.
Pull request overview
This pull request replaces JavaScript-based blog redirects with static HTML files using meta-refresh tags. The blog has moved to blog.rubygems.org, and this change provides a more reliable redirect mechanism that works without JavaScript enabled.
Changes:
- Removed JavaScript-based redirect from the main blog index page
- Added static HTML redirect pages for 56 individual blog posts spanning 2013-2025
- Added redirect rules in config.rb for year/month/day index pages to redirect to the main blog index
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| source/blog/index.html | Removed JavaScript redirect logic; meta-refresh tag already handles the redirect |
| source/blog/*/index.html (56 files) | Added static HTML redirect pages for individual blog posts with meta-refresh tags pointing to blog.rubygems.org |
| config.rb | Added redirect rules for year/month/day index pages (e.g., /blog/2018/01/) to redirect to /blog/ |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 2019/01/03 2019/01/04 2019/02/02 2019/03/12 2019/05/14 | ||
| 2020/04/27 2020/12/09 | ||
| 2021/02/15 | ||
| 2022/01/23 |
There was a problem hiding this comment.
The ymds array is missing entries for the new blog posts that have redirect HTML files. The array should include "2023/01/31", "2024/12/19", and "2025/07/17" to ensure that the year/month/day index pages for these dates are also redirected to the main blog index page, consistent with the existing pattern.
| 2022/01/23 | |
| 2022/01/23 2023/01/31 2024/12/19 2025/07/17 |
| ymds.map { |ymd| ymd.sub(%r{/\d+$}, "") }.each do |ym| | ||
| redirect "blog/#{ym}/index.html", to: "/blog/" | ||
| end | ||
| ## /blog/YYYY/ | ||
| ymds.map { |ymd| ymd.sub(%r{/\d+/\d+$}, "") }.each do |y| |
There was a problem hiding this comment.
The year and year/month redirect loops may create duplicate redirect entries when multiple blog posts share the same year or year/month combination. Consider adding .uniq after the .map operations to avoid defining the same redirect multiple times. For example: ymds.map { |ymd| ymd.sub(%r{/\d+$}, "") }.uniq.each do |ym|
| ymds.map { |ymd| ymd.sub(%r{/\d+$}, "") }.each do |ym| | |
| redirect "blog/#{ym}/index.html", to: "/blog/" | |
| end | |
| ## /blog/YYYY/ | |
| ymds.map { |ymd| ymd.sub(%r{/\d+/\d+$}, "") }.each do |y| | |
| ymds.map { |ymd| ymd.sub(%r{/\d+$}, "") }.uniq.each do |ym| | |
| redirect "blog/#{ym}/index.html", to: "/blog/" | |
| end | |
| ## /blog/YYYY/ | |
| ymds.map { |ymd| ymd.sub(%r{/\d+/\d+$}, "") }.uniq.each do |y| |
I added redirector for blog.rubygems.org with meta-refresh tag because middleman can't support dynamic redirector on
config.rb.