sheldonhull / sheldonhull.hugo

hugo repo full of magical blog goodness with an interspersing of 🌮🌮🌮
https://www.sheldonhull.com
Other
6 stars 2 forks source link
algolia blog codeit giscus hugo microblog

sheldonhull.hugo

Sheldon Hull Gopher Avatar

Overview

This blog has gone through several phases: Wordpress, Jekyll, Ghost, and Hugo. This site has also used a mix of themes at times as the desire to change things up hit me.

Prior theme is in history for Hermit

At this time, I've migrated to using Codeit.

Why?

install

Building & Tooling

Editing/Blogging

At this time, I use VSCode primarily. I've tried many other approaches, but can't get clean and simple workflow even if the UI (like Typora) is better. Using VSCode also lets me automate with InvokeBuild to make it quick to create new posts of different types.

You can also use "task explorer" extension which should be setup in this codespace, and it will give you buttons to trigger the tasks.

Errors

Environment Variables

# In profile
export ALGOLIA_APP_ID=04HSGXXQD5
export ALGOLIA_ADMIN_KEY=
export ALGOLIA_INDEX_NAME=sheldonhull.com
export ALGOLIA_INDEX_FILE=_site/algolia.json
[System.Environment]::SetEnvironmentVariable('ALGOLIA_APP_ID', '04HSGXXQD5','User')
[System.Environment]::SetEnvironmentVariable('ALGOLIA_ADMIN_KEY', $(Read-Host 'Enter Admin Key'),'User')
[System.Environment]::SetEnvironmentVariable('ALGOLIA_INDEX_NAME', 'sheldonhull.com','User')
[System.Environment]::SetEnvironmentVariable('ALGOLIA_INDEX_FILE', '_site/algolia.json','User')

Codeit Theme Reference

My Customization

The primary changes I've made that I couldn't easily contribute back upstream...

Things I Want to Do With Site Still

Cheatsheets

I'm really inspired by the layouts and clean look of devhints.io. I'd like to customize a layout for the theme that helps align multiple column based flex layouts with more of a "cheatsheet" look like devhints. Currently, my docs page works, but it's not as much of a cheatsheet format as I'd like.

Go Atomic Algolia

Replace atomic-algolia npm package with an efficient Go based tool. Put on hold for now, but plan on addressing someday when I'm a bit better at Go.

Gist Data Source Shortcode

I'd like to have a new shortcode that extracts the content of a target gist and then renders the markdown/code blocks as if I put the contents in the markdown file itself. Would be interesting to promote the possibility of more reference/cheatsheets as gists, while still rendering and presenting in full on blog, not just as a gist embedded javascript widget.

Closing

If you looked through this congrats. 👏

I put this updated readme out since there may be some folks new to Hugo and curious about how a repo like this can be used. Maybe you'll find it inspiring as a jump start of your own.

Regardless, hope you have a good journey with it yourself. I've had since 2013 blogging now and it's pretty cool to see how things have evolved over time.

WSL2

In WSL2:

sudo apt-get install build-essential
echo "Brew install in ubuntu might take 5 or more minutes"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/shull/.zprofile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install gcc
brew install hugo
source ~/.zshrc

Docker

Preliminary docker support for running hugo this way instead of brew install can be done with:

  HUGO_VERSION=0.82 \
&& docker-compose -f "docker-compose.hugo.yml" down --remove-orphans --volumes \
&& docker-compose -f "docker-compose.hugo.yml" build --build-arg HUGO_VERSION=$HUGO_VERSION \
&& docker-compose -f "docker-compose.hugo.yml" up

Other Tools

Use brew install exiftool for editing image EXIF data so image gallery doesn't have to read from sidecar files.

Troubleshooting

Devcontainers

Go Compile Version Does Not Match Go Tool Version

Probably because I'm using linuxbrew mixed in with other docker/goup scripts.

Other Credits