Go to file
2020-11-15 04:26:02 +08:00
archetypes Update blog components 2020-11-06 19:44:15 +08:00
assets PUBLISH: Implementing configurable Base16 schemes 2020-11-12 11:53:34 +08:00
bin Update a bunch of stuff 2020-11-10 01:53:52 +08:00
content Update docs and layouts 2020-11-15 04:26:02 +08:00
data PUBLISH: Implementing configurable Base16 schemes 2020-11-12 11:53:34 +08:00
layouts Update docs and layouts 2020-11-15 04:26:02 +08:00
static Personalize the personal site 2020-11-07 06:16:12 +08:00
.gitignore Migrate from Jekyll to Hugo 2019-08-14 16:36:03 +08:00
.travis.yml Update the build process 2020-11-12 12:42:58 +08:00
config.toml PUBLISH: Implementing configurable Base16 schemes 2020-11-12 11:53:34 +08:00
go.mod Update dependencies and setup 2020-11-06 20:43:22 +08:00
go.sum Update dependencies and setup 2020-11-06 20:43:22 +08:00
Makefile Update a bunch of stuff 2020-11-10 01:53:52 +08:00
README.adoc Update docs and layouts 2020-11-15 04:26:02 +08:00
shell.nix Create a Nix shell for the project 2020-11-08 01:39:05 +08:00

My blog featuring a fairly customized version of my More Contentful Hugo theme.

Getting started

Though, its obvious but then again, you may not remember how to do well in a year.

Prerequisites

  • Git

  • Hugo

  • Go runtime

  • Asciidoctor

  • jq

  • openring (you can easily compile one yourself with the Go toolchain)

  • GNU Make is optional but itll make your life easier.

  • Nix is also optional but itll make your life into an enlightened functional package management heaven.

Setting up

git clone $GIT_REPO
hugo mod get -u
hugo serve

Or you could simply get a server running with make serve and bada-bing, bada-boom! Youre now a "content creator"!

The theme is a modified version of a modified version of a theme so thats pretty cool.

To create a post, simply make with hugo new --kind post $PATH_REL_TO_CONTENT_DIR and youre on your merry way.

Setting up with Nix

If you have Nix installed, it is even easier by creating a local development environment for this project. And it already has one in shell.nix.

Just run nix-shell --pure shell.nix and youre set. An additional benefit with this setup is you dont have to manually compile openring since the config already sets it for you.

Even better, you can set up an automatic shell environment with direnv. To use it, just add .envrc!

echo "use nix" > .envrc && direnv allow

Deploying your blog

As of 2020-11-14, the blog is deployed into GitHub Pages with Travis CI for automation. Feel free to copy the .travis.yml for an idea.

Nonetheless, it is easy to migrate between hosts since Hugo is fast and simple. All you need to do is to run make build. Then, upload the build artefacts into your host provider of choice.

Project structure

blog
├── archetypes/
├── assets/
├── bin/
├── content/
├── data/
├── layouts/
├── public/
├── resources/
├── static/
├── config.toml
├── go.mod
├── go.sum
├── Makefile
├── README.adoc
└── shell.nix

Among all of the files laid above, here are the points of interest youre most likely to interact (aside from the content folder).

  • The ./bin directory contains custom scripts related for this project. An example of which is a script (i.e., ./bin/openring-create) that uses openring to create a webring from my public list of blogs I follow.

  • ./shell.nix is used for quickly creating a local project environment. It can be only used when Nix is installed.

  • The data folder contains some of the theme configuration as well as relevant data for my customizations.

  • The layout folder contains theme overrides as well as additional components for custom content types (e.g., making appropriate templates for my gallery section, modifying the post section to be more readable).