Changing Permalink in Hugo

This post is related to the previous one about changing a theme in Hugo. After I changed the theme to “PaperMod”, I realized that each article or blog post is under ‘post/date’ URL path. For example, the following is the permanent link/path of a post: https://blog.khmersite.net/post/2023/06/changing-hugo-theme/ Previously, there was no word post in the URL path, and I still want it gone again with this new theme, as below. https://blog.khmersite.net/2023/06/changing-hugo-theme/ The problem is, I forgot how it was done!...

July 15, 2023 · 1 min · 147 words · kenno

Changing Hugo Theme

Had you visited this blog recently, you may have noticed that the blog’s theme has changed. Here is a quick note on how I changed the theme of this blog from cayman-hugo-theme to PaperMod. For a little background, Hugo themes are installed as git submodule. Want a quick recap on how to use Git Submodule? Here is a good content [0]. First, the current theme needs to be removed: $ git submodule 4a924cef54081b61530a30bd69d442ae99916561 themes/cayman-hugo-theme (heads/master) $ git submodule deinit "themes/cayman-hugo-theme" $ git rm "themes/cayman-hugo-theme" $ git commit -m 'remove theme cayman-hugo-theme' Add a new theme, PaperMod [2] as the submodule....

June 20, 2023 · 1 min · 173 words · kenno

Build Hugo Extended for Linux ARM

As of today, there is no official build for Hugo extended for Linux ARM. Therefore, we need to build it ourselves. Prerequisite: build-essential package go1.15.3.linux-arm64 compiler export VERSION=0.79.1 curl -O -L https://github.com/gohugoio/hugo/archive/v$VERSION.tar.gz tar -xzf v$VERSION.tar.gz cd hugo-$VERSION go build --tags extended sudo cp hugo /usr/local/bin Hugo Static Site Generator v0.79.1/extended linux/arm64 BuildDate: unknown I built Hugo on Odroid C2, and it took over 10 minutes. I think a better way is to cross build Hugo on an x64 machine; but I haven’t tried it yet....

December 27, 2020 · 1 min · 94 words · kenno

How I Update Hugo on My Machine

I run hugo hot off the development branch. Periodically I need to checkout the code and re-build it. I find myself having to google to do this almost all the time. So today, I’m gonna document this here so I can quickly look it up next time I want to update hugo. The hugo code has already be cloned to the following location in my desktop: mkdir -p $HOME/dev/go cd $HOME/dev/go git clone https://github....

August 25, 2019 · 1 min · 119 words · kenno