{{ define "main" }} {{/* Define the section cards on the landing page. */}} {{/* Cards are displayed in order */}} {{ $sectionSlice := slice (dict "User Documentation" "/img/automate.svg") (dict "Knowledge Base" "/img/truck.svg") (dict "Contributing Guide" "/img/multi-crane.svg") }}
{{ $thisSite := .Site }} {{ $version_section := slice }} {{ range $sectionSlice }} {{ range $docType, $headerImage := . }} {{ if eq $docType "User Documentation" }} {{ $version_section = where $thisSite.Sections ".Page.Params.version" $thisSite.Params.latest }} {{ else }} {{ $version_section = where $thisSite.Sections ".Page.Params.product" $docType }} {{ end }}
...

{{range $version_section }}{{$docType}} {{ end }}

    {{ range ((index $version_section 0).Pages).GroupBy "Weight" }} {{ range .Pages.ByWeight }} {{ if not .Params.tocHidden }}
  • {{ .Title }}
    {{ .Description }}
  • {{ end }} {{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }}