Hugo cheatsheet

Commands #

Via hugo #

hugo new content docs/notes/hugo/index.md

Via Makefile in this repo #

NAME=hugo make note

Content formatting #

Images in menus #

[[menu.main]]
    name = "Home"
    url  = "/"
    weight = 1
    pre = "<img src='/img/og.jpg' style='height: 20px; width: 20px;' alt='test menu image'>"

source

book theme #

Notes about current theme

hints #

Hint shortcode can be used as hint/alerts/notification block.
There are 3 colors to choose: info, warning and danger.

{{< hint [info|warning|danger] >}}
**Markdown content**  
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
{{< /hint >}}

headers #

Header #1 - # goes to top-level title.
Front-matter title - to menu item name and browser window title

scripts #

# sort articles by weight
grep -Hr weight . | sort -k 3 -t :

This site #

Notes to self about this site/blog

Tags vs categories #

Tags - as many as possible, cover anything related. Categories - curated list to distinct different directions, like “educational” vs “daily life”

Would be nice to come up with some set of categories.