Skip to content

"Mass"/bulk alias? #392

@matiasgarciaisaia

Description

@matiasgarciaisaia

I just figured our blog's URLs changed some time ago, without us noticing. So there are now external links pointing to us with the old URLs, but the new ones have been out there for a while, too.

Google reported a few of them, so I've manually added alias: to those specific blogposts, but I'd love to have support for "alternate permalinks" (I don't have a good name yet) so each blog post automatically gets a redirect from the old URLs to the new ones.

The config would be something like:

activate :blog do |blog|
  blog.permalink = ":year/:month/:day/:title.html"
  blog.aliases = [
    ":year-:month-:day-:title.html",
    ":year/:month-:day-:title"
  ]

In that case, both /blog/2024/03-14-pi-day.html and /blog/2024-03-14-pi-day.html would redirect to /blog/2024/03/14/pi-day.html without having to set the redirects in each post.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions