A minimal version of breadcrumbs in Hugo, using linkTitle:
{{- range .Ancestors.Reverse }}
<a href="{{ .RelPermalink }}">{{ if .IsHome }}{{ "Home" }}{{ else }}{{ .LinkTitle }}{{ end }}</a> →
{{- end }}
<a class="current" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
Even more minimal:
{{- range .Ancestors.Reverse }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}{{ end }}</a> →
<a class="current" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
For this to work, make sure to add linkTitle to the FrontMatter:
+++
title = 'Really long and winding title'
linkTitle = 'short'
draft = false
+++
...
If linkTitle is not present, title is used instead.
Quick run through hugo Installation & Update on macOS.
Install hugo
brew install hugo
Check Version
hugo version
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown
Upgrade hugo
brew upgrade hugo
Warning: hugo 0.109.0 already installed
Create New Site
hugo new site my-new-hugo-site
cd my-new-hugo-site
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke
echo "theme = 'ananke'" >> config.toml
hugo does not come with an in-built theme, therefore we need to clone the anake theme into themes/ananke. More hugo themes. Clone and update config.toml.
Serve Site
hugo server
Build Site
Just hugo, nothing else.
hugo
Start building sites …
hugo v0.109.0+extended darwin/amd64 BuildDate=unknown
INFO 2022/12/26 19:37:15 syncing static files to /
| EN
-------------------+-----
Pages | 10
Paginator pages | 0
Non-page files | 0
Static files | 1
Processed images | 0
Aliases | 1
Sitemaps | 1
Cleaned | 0
Total in 154 ms