After exporting my blogger site and importing, everything was looking great, except one thing. The old site was still getting some (read, very little) traffic. And I wanted to redirect that to my new site. My solution works for humans, not so well for crawlers (that don’t run js). It requires a JS redirect on the blogger site, and a permalink set on the jekyll site.
Redirect (on Blogger)
In the template of the blogger site I inserted the following code into the
Permalink (on Jekyll)
The redirection works, mostly. The names of the files don’t quite match of if a permalink isn’t set. Thankfully for me they were pretty close.
Not too far, but not good enough. I can add a permalink to the front matter of each post, but there are like 60 so I don’t want to do that manually. So I broke out my trust irb REPL and got to work. This turned out the be pretty easy, Chiefly because the content I needed to add easily easy from the contents of the file, and the files I need to adjust had a distinct suffix from the newer post that were written on Jekyll. Below is the quick script I banged out.:
And that’s it. Now my old posts redirect to their equivalent on the new blog.