How to Hugo.

Linking to a theme

Link to Jesse’s theme as a submodule. Then create cbm folder for overrides and static content.

$ git submodule add themes/hugo-w3-simple
$ mkdir themes/cbm

Modify config.toml to use both themes.


Use a submodule to publish to public github. Then we can run Hugo locally, test, and push later.

$ git submodule add public


Test the content

#!/usr/bin/env bash

# Go To Public folder
cd $HOME/code/blog

echo -e "Open\033[0;32m http://localhost:1313/ \033[0mto test blog."

# Serve with drafts enabled
hugo server -D

Push the content

#!/usr/bin/env bash

echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"

# Build the project.
hugo # if using a theme, replace with `hugo -t <YOURTHEME>`

# Go To Public folder
cd $HOME/code/blog/public
# Add changes to git.
git add .

# Commit changes.
msg="rebuilding site `date`"
if [ $# -eq 1 ]
  then msg="$1"
git commit -m "$msg"

# Push source and build repos.
git push origin master


How to use Asciidoctor instead of Markdown. Useful for the diagram feature.

gem install asciidoctor asciidoctor-html5s asciidoctor-diagram concurrent-ruby
Gems are in $HOME/.gem/ruby/2.6.0
This website uses cookies to ensure you get the best experience on our website. Learn more Got it