My First (Hugo) Post

Published on 2024-06-21 by Kevin Zarate


Why I Needed a Change

For the longest time, my website was just a bunch of plain HTML files. It was easy enough when I started, but as I added more content, it got harder to manage: I kept adding links to the footer, a self hosted comment system was added, Umami analytics was… Each change required editing dozens of files and was not scalable. That’s when I heard about Hugo, a static site generator that promised to make my life easier. Here’s how the transition went for me.

Moving to Hugo

Hugo Mascot

Too cute to not share

I think I found about this from an Eric Murphy YouTube video, I’m not actually sure, but it was what I needed. I ended up creating my own theme using my old HTML to create default layouts and moved compartmentalize sections of my HTML to partials (things like my footer, header, the HTML to make my posts look pretty,comment system js and analytics)

I did have to slighly tweak my img, css, and styles calls to use " | relURL" and " | absURL." I spent way too much time before I figured that one out. It wasn’t all easy as me being stupid refusing to read more than 10 minutes of documentation and guides. I still haven’t fixed my dark mode toggle. I did eventually figure out how to slap my css to work on markdown. At first I tried using custom css tags so I wouldn’t have to touch my styles.css file, but no matter what I did, markdown format would not play nicely with my plans. I actually ended up giving up on having something to caption my images because I couldn’t style the text, but when I was writing my donations page in markdown, my brain turned on and two hashtags made an h2 tag. So all my image captions use an h5 tag (five hashtags) and I’m actually happy now.

I can now mostly write in plaintext and it’ll show up. Also, I got tags working to show suggested articles using the same tags. Honestly, I never thought I’d do that without more javascript and json files