Skip to content

Instantly share code, notes, and snippets.

@xixianykus
xixianykus / links.md
Last active May 12, 2021
List of useful web design links
View links.md
@xixianykus
xixianykus / breadcrumbs.md
Created Apr 9, 2021
breadcrumb nav for Hugo
View breadcrumbs.md

Copy the the following to a partial file. I only just changed the class name. I used CSS to control the layout, add the > symbols.

`

    {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}

{{ define "breadcrumbnav" }} {{ if .p1.Parent }} {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }} {{ else if not .p1.IsHome }} {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
@xixianykus
xixianykus / len-Hugo.txt
Created Apr 9, 2021
Count pages in Hugo
View len-Hugo.txt
{{ len .Site.RegularPages }}