mirror of https://github.com/onweru/compose.git

weru
01.08.2022 1b61f09eea2a67ef791fbbabd6ed738ea2eb4c1f
correct homepage regression #73

Signed-off-by: weru <fromweru@gmail.com>
2 files modified
16 ■■■■ changed files
exampleSite/content/tutorials/example/_index.md 2 ●●● patch | view | raw | blame | history
layouts/_default/baseof.html 14 ●●●● patch | view | raw | blame | history
exampleSite/content/tutorials/example/_index.md
@@ -5,4 +5,4 @@
Welcome to the Compose theme user guide! This guide shows you how to get started creating technical documentation sites using Compose, including site customization and how to use Compose's blocks and templates.
{{< button "./install-theme/" "Get started now" >}}
{{< button "../../docs/compose/install-theme/" "Get started now" >}}
layouts/_default/baseof.html
@@ -12,10 +12,20 @@
    {{- with $docSections }}{{- else }}
      {{- $docSections = "docs" }}
    {{- end }}
    {{- if or (in $docSections .Section) (and (ne site.Params.uniqueHomepage true) .IsHome) }}
    {{ $uniqueHomepage := .IsHome }}
    {{ if site.Params.uniqueHomepage }}
      {{ if .IsHome }}
        {{ $uniqueHomepage = true }}
      {{ end }}
    {{ else }}
      {{ $uniqueHomepage = false }}
    {{ end }}
    {{- if and (in $docSections .Section) (ne $uniqueHomepage true) }}
      {{- partial "document" . }}
    {{- else }}
      {{- block "main" . }}{{ end }}
      <div class="content">
        {{- block "main" . }}{{ end }}
      </div>
    {{- end -}}
  </div>
  {{- partialCached "footer" . -}}