Skip to content

Added redirector for blog.rubygems.org#1632

Merged
hsbt merged 3 commits intomainfrom
redirect
Feb 17, 2026
Merged

Added redirector for blog.rubygems.org#1632
hsbt merged 3 commits intomainfrom
redirect

Conversation

@hsbt
Copy link
Member

@hsbt hsbt commented Feb 17, 2026

I added redirector for blog.rubygems.org with meta-refresh tag because middleman can't support dynamic redirector on config.rb.

Copilot AI review requested due to automatic review settings February 17, 2026 07:52
@hsbt hsbt merged commit e6545cb into main Feb 17, 2026
9 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
2022/01/23
2022/01/23 2023/01/31 2024/12/19 2025/07/17

Copilot uses AI. Check for mistakes.
Comment on lines +220 to +224
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|
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

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|

Suggested change
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|

Copilot uses AI. Check for mistakes.
@hsbt hsbt deleted the redirect branch February 17, 2026 07:56
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