Go to file
Gabriel Arazas f835f0aa6f
Create QoL improvements for code listings
- Added a "Copy to clipboard" button for easily following in case the
  post is code-heavy.

- Added a toggle fullscreen button for code listings that are too large.
  It is pretty small and limiting in those cases, after all.
2023-02-21 01:06:05 +08:00
.github/workflows Add weekly schedule for building 2022-12-18 13:39:52 +08:00
archetypes Update Hugo archetypes with current email address 2023-02-20 12:46:31 +08:00
assets Update Asciidoctor stylesheet 2023-02-21 01:05:07 +08:00
bin Create script for managing code-specific content 2023-02-21 01:04:38 +08:00
content Update contact email address 2022-12-18 13:41:21 +08:00
data Update light color scheme 2023-02-21 01:05:23 +08:00
i18n Create QoL improvements for code listings 2023-02-21 01:06:05 +08:00
layouts Create QoL improvements for code listings 2023-02-21 01:06:05 +08:00
static Update logo 2022-11-22 23:09:33 +08:00
.envrc Use flake by default 2022-11-22 23:10:53 +08:00
.gitignore Update .gitignore 2022-11-22 22:37:51 +08:00
config.toml Update copyright footer 2023-01-05 21:01:37 +08:00
flake.lock Update flake inputs 2023-02-14 11:20:30 +08:00
flake.nix Set nixpkgs branch to nixpkgs-unstable 2022-11-22 22:37:51 +08:00
Gemfile Add Gemfile to Netlify builds 2022-11-28 08:20:48 +08:00
go.mod Update Hugo modules 2022-11-28 11:06:49 +08:00
go.sum Update Hugo modules 2022-11-28 11:06:49 +08:00
LICENSE Cover the project under MIT license 2021-01-22 05:08:08 +08:00
Makefile Update dev environment 2022-03-01 18:00:18 +08:00
netlify.toml Revert Netlify build to GitHub Actions 2022-11-28 11:17:59 +08:00
README.adoc Update docs and layouts 2020-11-15 04:26:02 +08:00
shell.nix Update environment shell hook 2022-11-22 23:18:42 +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).