Just like the last post, here is the TL;DR#

  1. Git and Hugo are intertwined. So instead of working on your local copy of the site and updating that, I have had success with deleting the local branch and cloning it. This is a worf-flow issue with git, not necessarily a Hugo problem, but it’s been a source of inconsistency.
  2. Hugo can be a bit fiddly. I have had situations where the theme just vanishes. I think this is an issue of cloning the theme locally vs. adding the theme as a git submodule. Who fucking knows?
  3. Speaking of fiddly, I have been adding markdown files with the “hugo new content posts/newpost.md” command one at a time.
  4. Deploying the updated site is an issue I have yet to tackle. Once I am comfortable with the development process, THEN I will take on automated staging and deployment. For now, I just copy the “Public” directory up to my webserver with SCP.

When we last saw our heroes…#

I was complaining about consistency. I read somewhere a long time ago that when testing new video games, the game behaving unpredictibly was more stressful than losing the game. That has been my issue with Fallout 4, and it’s my issue with Hugo.

Part of the issue is that git is sort of baked into the Hugo model, but not really documented. I am using GitHub as a kind of cloud storage for my site. It works for the most part, but I have to delete and rebuild repositories a lot as I learn the process, so I also back up my .md files in another place.

For better or worse, I am not really a “read the manual” kind of dude. I’m more of a “wail away at the commandline until it works” type. It’s not that I never read the manual, I just like to take a shot at it first. This is how I learned about Unix and Linux back in the day, and it’s how I do it today.

If you want to read a book about a programming language, you have to understand that programming books are written for people that are already programmers. This is the problem with learning about web development stacks. There is all of this stuff about git that is just sort of assumed. So as I work on this site, it just quits updating the home page, or the theme disappears. I think now that I have added the theme as a git sub-module it’ll work?

I have gotten this site to the point that I can usually post text. But my blogging style involves memes and reaction gifs, and I have yet to take on that part just yet. The other issue I haven’t tackled is figuring out how to deploy new pages. I’d like to keep it pretty oldschool and use rsync or something like that. I am saving the deployment phase for last, because that is more familiar to me.

The final wrinkle in this, that I haven’t mentioned, is VSCode. That is another thing that I am learning about on top of everything else.

So the workflow tentatively works like this:

git clone https://github.com/chrizzle23/web-chrizzle23.git
cd web-chrizzle23
hugo new content posts/newpost.md
hugo server

Then make your edits in VSCode. Then:

hugo #one last time, just to be safe
git add .
git commit -m "new post"
git push

It makes more sense every day, but you have to keep at it#

In the words of the great teacher of absurdist philosophy, BoJack Horseman:

It gets easier. Every day, it gets a little easier. But you gotta do it every d That’s the hard part. But it does get easier.