This repo contains my experimental self-hosted blog source code, generated by Hugo.
The code in this repo is used to generate a static site in a separate GitHub pages repo.
This separate repo is a submodule in this repo in the public/
folder.
I am not a Go developer, but Hugo seemed like a nice tool for managing a static site without, so I'm just giving it a shot for now.
I'm currently using the ananke theme
I'm currently using the hugo-coder theme
# Install hugo (if needed)
> brew install hugo
# Clone the repo
# --recursive b/c themes and the public/ folder are submodules
> git clone --recursive [email protected]:andywhite37/blog
# Go into the repo
> cd blog
# Make sure to checkout the master branch of the submodule, so the deploy script updates the branch correctly
> cd public && git checkout master && cd ..
> git submodule update --init --recursive
> hugo new posts/2021-01-27-my-new-post.md
# Run the local server (with drafts included)
> hugo server -D
> hugo
This script builds the site to public/
, then commits and pushes the public/
folder (which is a submodule to my GitHub pages repo https://github.com/andywhite37/andywhite37.github.io. Then it commits and pushes the submodule change (and any other changes) to this blog
repo.
> ./deploy