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 https://github.com/jesselau76/hugo-w3-simple.git themes/hugo-w3-simple
$ mkdir themes/cbm
Modify config.toml to use both themes.
Publish
Use a submodule to publish to public github. Then we can run Hugo locally, test, and push later.
$ git submodule add https://github.com/clintonmasters/clintonmasters.github.io.git public
Scripts
Test the content
#!/usr/bin/env bash
# Go To Public folder
cd $HOME/code/blog
echo
echo -e "Open\033[0;32m http://localhost:1313/ \033[0mto test blog."
echo
# 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"
fi
git commit -m "$msg"
# Push source and build repos.
git push origin master
Asciidoctor
How to use Asciidoctor instead of Markdown. Useful for the diagram feature. http://ratfactor.com/hugo-adoc-html5s/
gem install asciidoctor asciidoctor-html5s asciidoctor-diagram concurrent-ruby
Gems are in $HOME/.gem/ruby/2.6.0