Hugo Brainstorming

Today was a lot of interview prep. That’s great because I like the self-reflection time, but it doesn’t leave too much time to work on these side projects.

In the spirit of documenting my process of thinking and working, I want to talk about how I’m going to tackle the next step of this Hugo migration.

The problems I’m facing, in no particular order, are:

So to fix that front matter issue, I’m definitely writing a script to do it. I have just enough blog posts to say, no way I’m not doing this by hand. I’ve thought about 7 steps that the script should take: * Read in the current front matter * Compare it to my “ideal list” of key-value pairs and keep the good ones * Add the missing ones with default values I need to go in and change * Add the filename to some list that tells me to look at some thing * Also note which files have an image in them * Make a new file containing the new front matter and the old content * Put this new file in some target directory

The code will definitely look like: for every file in my /posts folder, do the thing.


Thanks for reading this post! Comments, questions, and feedback are always welcome.