Good URLs never move…
… but sometimes it’s necessary.
I kept a few of my pages on this site under the /p/ subdirectory because I wasn’t sure if I was going to keep using Pelican or eventually move back to Blogger, which doesn’t let you set up your own directory structure in any way.
While fooling around, I noticed that Pelican is pretty tolerant of how you want to lay your site out, so I ended up moving a bunch of shit around. I’ll put some 301 redirects in my S3 bucket so the old links keep working for a while (like I have with a few old blog entries that are linked to in places beyond my control) and hope for the best.
It turns out that moving things around with git is surprisingly easy, as long as you use the git mv
command. Moving things without it then trying to clean up your git repository seems decidedly more work-intensive. You can even get the complete history of a file that’s been moved by using git log --follow /path/to/file
- though I’m not really sure why that behaviour isn’t on by default (just one of the many UI travesties in git I suppose).