Compare commits

..

No commits in common. "f684465d00737439773e695bc097671b867b795e" and "c6abdaefabd2222f99d5cf5da5c7ad75833d0ed1" have entirely different histories.

6 changed files with 5 additions and 58 deletions

View File

@ -3,11 +3,10 @@ languageCode = "en-us"
title = "Basic Hugo Theme" title = "Basic Hugo Theme"
copyright = "Copyright © 2019, Copyright Owner Name | Built with [Hugo](https://gohugo.io/)" copyright = "Copyright © 2019, Copyright Owner Name | Built with [Hugo](https://gohugo.io/)"
theme = "basic-theme" theme = "basic-theme"
paginate = 5 paginate = 10
[permalinks] [permalinks]
posts = "/:year/:month/:title/" posts = "/:year/:month/:title/"
[params] [params]
subtitle = "A theme with no CSS and only basic layouts" subtitle = "A theme with no CSS and only basic layouts"
mainSections = [ "posts" ]

View File

@ -9,12 +9,7 @@
<header class="list-content"> <header class="list-content">
{{ .Content }} {{ .Content }}
</header> </header>
{{ range $index, $page := (.Paginate (where .Pages ".Params.hidden" "!=" "true")).Pages }} {{ range .Pages }}
{{ if ne $index 0 }} {{ .Render "summary"}}
{{ end }}
{{ .Render "summary" }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ define "content-footer" }}
{{ partial "paginator.html" .Paginator }}
{{ end }}

View File

@ -10,6 +10,3 @@
{{ .Content }} {{ .Content }}
</article> </article>
{{ end }} {{ end }}
{{ define "content-footer" }}
{{ partial "prev-next-page.html" . }}
{{ end }}

View File

@ -4,12 +4,7 @@
{{.Content}} {{.Content}}
</article> </article>
<!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. --> <!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -->
{{ range $index, $page := (.Paginate (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" "true" )).Pages }} {{ range first 10 .Pages }}
{{ if ne $index 0 }} {{ .Render "summary"}}
{{ end }}
{{ .Render "summary" }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ define "content-footer" }}
{{ partial "paginator.html" .Paginator }}
{{ end }}

View File

@ -1,19 +0,0 @@
<nav>
<ul>
<li>
{{if .HasPrev}}
<a alt="Newer articles" href="{{ .Prev.URL }}">&larr; Newer</a>
{{ else }}
&nbsp;
{{end}}
</li>
<li>Page {{ .PageNumber }} of {{ .TotalPages }}</li>
<li>
{{if .HasNext}}
<a alt="Older articles" href="{{ .Next.URL }}">Older &rarr;</a>
{{ else }}
&nbsp;
{{end}}
</li>
</ul>
</nav>

View File

@ -1,20 +0,0 @@
{{ if not .Params.Menu }}
<nav>
<ul>
<li>
{{ if .NextInSection }}
<a alt="Newer article" href="{{ .NextInSection.Permalink }}">&larr; Newer</a>
{{ else }}
&nbsp;
{{ end }} </li>
<li><a alt="Top of page" href="#">Top</a></li>
<li>
{{ if .PrevInSection }}
<a alt="Older article" href="{{ .PrevInSection.Permalink }}">Older &rarr;</a>
{{ else }}
&nbsp;
{{ end }}
</li>
</ul>
</nav>
{{ end }}