Refactoring your blog urls
I just did a quick refactoring of my JAMStack blog urls. Some didn’t fit with my style, some had that I wanted to switch to, and others were ridiculously long. I’ve been using forestry as my CMS, I write many of my posts there, and sometimes it picks some crazy file names (based on my titles). It was time to refactor. Large Refactor At The Command Line When refactorings similar to this get really big I often need to do some project wide find an replace, I usually do this right from the command line. 🖊 Rename posts change the filename # My post urls are based on the file name of my markdown file, so I can simply go through my filesystem and rename anything I want. From here its probably best to only commit the addition of the new file name, until the redirects clear, but these are all low traffic posts for me so I just commited both at once. Safely redirect without breaking links _redirects ⤴ /redirects # I am hosted on netlify, which automatically puts very ⚡ performant redirects on th…