Skip to main content

Hugo Cheatsheet for This Site

Quick reference for the commands and file layout I keep forgetting.

Commands

hugo server -D      # dev server, include drafts
hugo --gc           # production build into public/

Where things live

Path Purpose
content/posts/ blog posts
content/notes/ reference notes
data/menu/extra.yaml header/footer menu entries
themes/hugo-geekblog/ theme (git submodule)

Remember

The theme must be built once after a fresh clone:

Read full post gblog_arrow_right

Five Terminal Tips I Use Every Day

Small habits that compound over time:

  1. Jump back to the previous directory
cd /var/log
cd ~/projects
cd -    # back to /var/log
  1. Reuse arguments from the previous command
mkdir -p ~/.local/bin
cd !!:1
  1. Search shell history incrementally with Ctrl+R.

  2. Fix a long command with fc — it opens the last command in your editor.

  3. Watch a file instead of re-running a command

watch -n 2 'df -h /'

None of these are fancy, but together they save real time every day.