HUGO
Links
Commands
-
Install: yay -S hugo
-
Help: hugo help
-
New Site: hugo new site <site-name>
-
New Post: hugo new posts/<post-name>.md
-
Build: hugo
-
Serve: hugo server [options]
- -D for drafts enabled
- -p
- —navigateToChanged
Directory structure
/hugo-site
├── archetypes
├── content
├── data
├── layouts
└── static
-
archetypes: hugo new <archetype>
Set custom front-matter and content (markdown)
-
content: meat of site (markdown)
- Also determines relative urls and layout used depending on dir name and structure
-
data: lotsa shared front-matter of sorts (json, yaml, toml)
-
layouts: templates for content (html)
-
static: (img, css, js blah)
hugo without theme
Hugo pulls data from content/
, data/
, static/
and structures it by templates defined in layouts/
dir.
Content -> Layout mapping: Template Lookup Order
NOTE: Leaving in favor of 11ty, couldn’t get a single page up without writing 4 more files and skimming docs and posts for hours. Not what I am looking for.