home.html

Source Code

HTML Output

{{ define "home" }}

    <div id="articleContent" class="text-black p-4">
      {{if lt (len .Site.Sections) 1}}
        {{- partial "welcome.html" -}}
      {{- else -}}
      {{ .Content }} 
      {{- end -}}
    </div>
    <div class="p-4">
      {{- partial "article/tiles.html" . -}}
    </div>
    
{{ end }}

JSON Output

[
    {{- range $index, $page := .Pages }}
    {{- if ne $page.Type "json" }}
    {{- if and $index (gt $index 0) }},{{- end }}
    {{- partial "json.json" . }}
    {{- end }}
    {{- if eq .Kind "section" }}
        {{- template "section" . }}
    {{- end }}
    {{-  end }}
]
{{- define "section" }}
{{- range .Pages }}
    {{- if ne .Type "json" }}
    ,{{- partial "json.json" . }}
    {{- end }}
    {{- if eq .Kind "section"}}
        {{- template "section" . }}
    {{- end }}
{{- end }}
{{- end }}