Skip to content

andywhite37/blog

Repository files navigation

blog

https://andywhite.xyz

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.

Theme

I'm currently using the ananke theme

I'm currently using the hugo-coder theme

First time setup

# Install hugo (if needed)
> brew install hugo

# Clone the repo
# --recursive b/c themes and the public/ folder are submodules
> git clone --recursive git@github.com: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 ..

Update themes and other submodules

> git submodule update --init --recursive

Create a new post

> hugo new posts/2021-01-27-my-new-post.md

Run local server

# Run the local server (with drafts included)
> hugo server -D

Build site to public/

> hugo

Build site to public/ and deploy

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

About

Source code for my personal website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages