Compare commits
2 Commits
c6abdaefab
...
f684465d00
Author | SHA1 | Date |
---|---|---|
Kevin C. Coram | f684465d00 | |
Kevin C. Coram | 3365dc074a |
|
@ -3,10 +3,11 @@ 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 = 10
|
paginate = 5
|
||||||
|
|
||||||
[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" ]
|
||||||
|
|
|
@ -9,7 +9,12 @@
|
||||||
<header class="list-content">
|
<header class="list-content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</header>
|
</header>
|
||||||
{{ range .Pages }}
|
{{ range $index, $page := (.Paginate (where .Pages ".Params.hidden" "!=" "true")).Pages }}
|
||||||
{{ .Render "summary"}}
|
{{ if ne $index 0 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ define "content-footer" }}
|
||||||
|
{{ partial "paginator.html" .Paginator }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -9,4 +9,7 @@
|
||||||
<article>
|
<article>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</article>
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
{{ define "content-footer" }}
|
||||||
|
{{ partial "prev-next-page.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -4,7 +4,12 @@
|
||||||
{{.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 first 10 .Pages }}
|
{{ range $index, $page := (.Paginate (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.hidden" "!=" "true" )).Pages }}
|
||||||
{{ .Render "summary"}}
|
{{ if ne $index 0 }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ define "content-footer" }}
|
||||||
|
{{ partial "paginator.html" .Paginator }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -0,0 +1,19 @@
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{{if .HasPrev}}
|
||||||
|
<a alt="Newer articles" href="{{ .Prev.URL }}">← Newer</a>
|
||||||
|
{{ else }}
|
||||||
|
|
||||||
|
{{end}}
|
||||||
|
</li>
|
||||||
|
<li>Page {{ .PageNumber }} of {{ .TotalPages }}</li>
|
||||||
|
<li>
|
||||||
|
{{if .HasNext}}
|
||||||
|
<a alt="Older articles" href="{{ .Next.URL }}">Older →</a>
|
||||||
|
{{ else }}
|
||||||
|
|
||||||
|
{{end}}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{ if not .Params.Menu }}
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{{ if .NextInSection }}
|
||||||
|
<a alt="Newer article" href="{{ .NextInSection.Permalink }}">← Newer</a>
|
||||||
|
{{ else }}
|
||||||
|
|
||||||
|
{{ end }} </li>
|
||||||
|
<li><a alt="Top of page" href="#">Top</a></li>
|
||||||
|
<li>
|
||||||
|
{{ if .PrevInSection }}
|
||||||
|
<a alt="Older article" href="{{ .PrevInSection.Permalink }}">Older →</a>
|
||||||
|
{{ else }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue