Skip to content

Hugo

September 29, 2023
May 9, 2017

Hugo :: A fast and modern static website engine
Comparing Static Site Engines with Brian Rinaldi - YouTube

How to start a blog using Hugo

Hacking Management Author's blog

Hugo - Shortcodes = tags
Hugo - Go Template Primer
Hugo - Taxonomy Overview
Hugo - Syntax Highlighting

CLI

Hugo - Using Hugo
Hugo - Commands

yaourt -S hugo-bin pygmentize # for Arch

hugo help
hugo config
hugo new site <name>
hugo new post/<file.md>
hugo -v

# install themes, Hugo does not comes with default theme
git clone https://github.com/dim0627/hugo_theme_robust.git themes/hugo_theme_robust
# cd themes/hugo_theme_robust; git checkout b8ce466; cd ../../
git clone https://github.com/spf13/herring-cove.git themes/herring-cove

hugo server
hugo server --theme=<theme> --buildDrafts

Config

Hugo | Configure Hugo
Hugo | Archetypes

draft: false
isCJKLanguage: true

Template

Hugo | Templates
Hugo | Front Matter
text/template - The Go Programming Language
html/template - The Go Programming Language

Themes

Hugo Themes Site
spf13/hugoThemes: All Themes Hugo

spf13/HugoBasicExample: Example site to use with Hugo & Hugo Themes

I need:

It's better to show tags and categories in archive and main index.

Minos | Hugo Themes side TOC, responsive, tags/categories index
hugo-dusk | Hugo Themes tags/categories index
simple-a | Hugo Themes tags/categories index
Hugo Bootstrap v4 Blog | Hugo Themes project and about
Wave | Hugo Themes tags/categories index
Hello Programmer | Hugo Themes TOC
Mainroad | Hugo Themes
halogenica/beautifulhugo: Theme for the Hugo static website generator

Portfolio themes:

Docs themes:
Learn | Hugo Themes
DocuAPI | Hugo Themes
Techdoc | Hugo Themes

Deployment

Aerobatic - NPM scripts for building and deploying Hugo sites
Hugo - Hosting on GitHub Pages

Tutorial

Hugo Website Tutorial with a Live Static E-Commerce Example - Snipcart

Tips and Tricks

Live Hugo Site search with Lunr.js - tips & tricks - Hugo Discussion

Fast, instant client side search for Hugo static site generator

How to Make the Team Happy with Hugo and Headless | Kontent by Kentico.

Hugo Wikilink Support | Quinn Casey
13rac1/goldmark-wikilink: A Wikilink extension for the goldmark markdown parser.

Support wiki-style internal page links · Issue #3606 · gohugoio/hugo
bep/portable-hugo-links: A test repo to test out the new Markdown Render Hooks in Hugo 0.62.0 transform

Dump context

Add layouts/index.html

{{ range $k, $v := .Site.Params }}
    {{ $k }} : {{ $v }}
{{ end }}

{{ range $k, $v := .Site.taxonomy }}
    {{ $k }} : {{ $v }}
{{ end }}