Skip to content

Instantly share code, notes, and snippets.

@ojacques
Created July 22, 2021 11:32
Show Gist options
  • Save ojacques/297054aaa291a60cbff4e2ec3faf2343 to your computer and use it in GitHub Desktop.
Save ojacques/297054aaa291a60cbff4e2ec3faf2343 to your computer and use it in GitHub Desktop.
Collection of hugo / template snippets

Collection of hugo / template snippets

Go through all pages of the site

{{ range .Site.Pages }}
  {{ if eq .File.BaseFileName "_index" }}
    👉INDEX!: type: {{ .Type }}, File: {{ .File.BaseFileName }}, {{ .Title }}<br/>
  {{ else }}
  type: {{ .Type }}, File: {{ .File.BaseFileName }}, title: {{ .Title }} <br/>
  {{ end }}
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment