BlogMore v2.39.0 has a couple of changes, one more or less cosmetic, the other a new feature that I probably should have added right near the start of the project.

First, the cosmetic: in pages and posts, when you use headings (#, ##, etc.), a is added to the end of each heading, along with some show-on-mouse-hover styling, to make it easy to grab the anchor of a particular section of a page1. A problem I'd noticed with this recently is that the shows up in the search text, and also in the content of all the feeds. While not a problem as such, it felt untidy.

So, with this release that particular character is stripped from the search index and from the feeds.

The second change is a facility that should be useful if you have legacy URLs that you really must have land on an actual page or post: redirection support.

This facility is provided by a new redirect_from frontmatter property. From now on, a page or a post can declare which URLs should be redirected to it. So, if you have a post that, given your current post location setup, would land at /2006/06/06/hello-world/, but in some other incarnation of your blog lived at /posts/2006-06-06-hello-world.html, you can now set this in the frontmatter:

redirect_from: /posts/2006-06-06-hello-world.html

and the old URL will be redirected to the new one. This is achieved by simply creating a very minimal HTML file at the old location, which contains a redirection. The content of the file will end up looking something like this:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Redirecting...</title>
    <link rel="canonical" href="https://example.com/2006/06/06/hello-world/">
    <meta http-equiv="refresh" content="0; url=/2006/06/06/hello-world/">
  </head>
  <body>
    <p>Redirecting to <a href="/2006/06/06/hello-world/">/2006/06/06/hello-world/</a>...</p>
  </body>
</html>

If a blog has migrated between locations and/or generation tools over the years, and there are a number of different legacy URLs out there still pointing to a post you really want to keep readable to all, you can also redirect from multiple URLs:

redirect_from:
  - /posts/2006-06-06-hello-world.html
  - /posts/2006/06/06/hello-world.html
  - /my/really/old/blog/structure/hello-world-06-06-06.html

While all of this would have been possible anyway, by creating the appropriate file, with the appropriate content, in the extras directory, this approach helps automate the process and also means that the redirection information lives with the page or post being redirected to.


  1. The recently-added floating ToC is another way to do this now too.