mirror of
https://github.com/loikein/hugo-tufte.git
synced 2025-08-13 14:12:43 +02:00
remove redundant layout, add showSummary switch
This commit is contained in:
parent
c5e3a781e9
commit
fa6bda5448
4 changed files with 6 additions and 22 deletions
layouts
|
@ -1,21 +0,0 @@
|
|||
{{ .Title }}
|
||||
<!-- {{ template "_internal/pagination.html" }} -->
|
||||
Hello this is a list of content.
|
||||
{{ .TableOfContents }}
|
||||
|
||||
{{ $paginator := .Paginate ( (.Data.Pages.GroupByDate "2006") ) }}
|
||||
|
||||
<ul>
|
||||
<li>PageNumber: {{ $paginator.PageNumber }}</li>
|
||||
<li>URL: {{ $paginator.URL}}</li>
|
||||
<li>Pages: {{ $paginator.Pages }}</li>
|
||||
<li>TotalPages: {{ $paginator.TotalPages }}</li>
|
||||
</ul>
|
||||
|
||||
{{ range $paginator.PageGroups }}
|
||||
<h2>{{ .Key }}</h2>
|
||||
{{ range .Pages }}
|
||||
<br/>
|
||||
<a href="{{ .RelPermalink }}">{{.Title}}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -22,8 +22,10 @@
|
|||
{{ if .Description }}
|
||||
<p>{{ .Description }}</p>
|
||||
{{ else }}
|
||||
{{ if .Site.Params.showSummary }}
|
||||
<p>{{ truncate 140 .Summary }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue