diff options
Diffstat (limited to 'layouts/partials/classic_index.html')
-rwxr-xr-x | layouts/partials/classic_index.html | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/layouts/partials/classic_index.html b/layouts/partials/classic_index.html index 0813f46..5a4d567 100755 --- a/layouts/partials/classic_index.html +++ b/layouts/partials/classic_index.html @@ -4,26 +4,28 @@ <div id="content"> <div class="blog-index"> {{ $paginator := where site.RegularPages "Type" "in" site.Params.mainSections | .Paginate }} - {{ range $paginator.Pages }} - <article> - <!-- {{ .Scratch.Set "isHome" true }} --> - {{ partial "post_header.html" . }} - {{ if eq .Site.Params.truncate false }} - {{ .Content }} - {{ else if .Description }} - {{ .Description }} - <footer> - <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On →{{ end }}</a> - </footer> - {{ else }} - <p>{{ .Summary }}</p> - {{ if .Truncated }} - <footer> - <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On →{{ end }}</a> - </footer> + {{ if $paginator }} + {{ range $paginator.Pages }} + <article> + <!-- {{ .Scratch.Set "isHome" true }} --> + {{ partial "post_header.html" . }} + {{ if eq .Site.Params.truncate false }} + {{ .Content }} + {{ else if .Description }} + {{ .Description }} + <footer> + <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On →{{ end }}</a> + </footer> + {{ else }} + <p>{{ .Summary }}</p> + {{ if .Truncated }} + <footer> + <a href="{{ .Permalink }}" rel="full-article">{{ with .Site.Params.continueReadingText }}{{ . | markdownify }}{{ else }}Read On →{{ end }}</a> + </footer> + {{ end }} {{ end }} + </article> {{ end }} - </article> {{ end }} <!-- {{ template "_internal/pagination.html" . }} default pagination --> {{ partial "pagination.html" . }} <!-- use custom pagination --> @@ -31,4 +33,4 @@ {{ partial "sidebar.html" . }} <!-- sidebar --> </div> </div> -{{ partial "footer.html" . }} <!-- footer -->
\ No newline at end of file +{{ partial "footer.html" . }} <!-- footer --> |