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].

  1. 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'
  1. Add a new theme, PaperMod [2] as the submodule.
$ git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
$ git add .gitmodules
$ git add config.yml

$ git commit -m 'change theme to PaperMod'
$ git push

Note: As each Hugo theme contains specific parameters, I also had to update the config.yml required by this new theme. A copy of a sample config.yml is available at the theme’s exampleSite [1].