A New Beginning
Recently inspired by my coworkers who were showing me their personal website, I decided to spin up my own.
Previously I experienced choice paralysis and a little bit of burn out when trying to create my own website. Thinking about what framework to use, how I’m going to host it, researching deployment methods… I remembered I had setup GitHub Pages for a school assignment. I took a look and there was my beautiful single line of plain HTML.
Now I really did need to decide on how to build the website. After some quick searching, I came across Hugo. The three aspects of Hugo which lead me to choosing it are that it is written with Go, content is built using Markdown, it generates static sites which is required for GitHub Pages. The Go programming language is one that I have started using recently for work and school projects (stay tuned for more posts on these) so using a tool built with it is cool. During school I struggled for a while with how to take digital notes. After years of using Word, PowerPoint, Notepad, Google Docs, etc, I started using Markdown. There are so many benefits for Markdown for me. Content creation can be done with a good text editor such as VS Code where there is less friction compared to a tool like Word. Viewing Markdown content offers many of the same benefits (headings, lists, images) as other rich text editors such as Words. There are many tools to view Markdown, my favorite is VS Code (this is a theme throughout my life).
Now, if you can consider it, Hugo serves as a new tool for me to manage and view markdown content killing two birds with one stone. Push to main to upload a new post? EASY.
Deployment Woes
I also had to figure out the deployment method. Another quick search landed me on the Hugo documentation page for setting up a GitHub Action to deploy to GitHub pages. Of course it did not work first try. I referred to many sources but every time the action ran, it would succeed, but the site would not work. Eventually I found the a starter workflow that is up to date on the actions/configure-pages GitHub.

Eventually I realized that the index.html file and other static site files were not being included in the artifact being uploaded for the static site.
Why?
Because the Hugo build command gave this warning: WARN found no layout file for "html" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Why?????
Hugo themes are included using submodules which is very cool as it decouples the theme from the projects well. I chose to switch themes straight away and landed on [Blowfish][3]. Their documents and guides are very good for Hugo newbies and honestly they have helped set this up quicker than if I used other sources. However, the installation guide does not explicitly tell you the git commands to use for the submodules. This is fine as some pre-requisite knowledge must be assumed. I have use projects developed by others that use git submodules, but I have never set them up myself. I assumed that committing the .gitmodule file generated by the git submodule add command would be enough to include it in my git repo. And that is why my theme was not included, which is why the index.html was not being generated and uploaded. I ran git add themes/blowfish committed and pushed, then boom! My page finally worked as intended.
Now time for my first post.
