removed extra list template

master
Lars Hoogestraat 6 months ago
parent d3603c9e7f
commit f0e29bf4c5
  1. 2
      README.md
  2. 15
      layouts/_default/list.html
  3. 7
      layouts/partials/article-header.html
  4. 23
      layouts/posts/list.html
  5. 14
      layouts/posts/single.html

@ -42,6 +42,8 @@ To inject custom HEAD elements create a "head-custom.html" in '<YOUR_SITE>/layou
For changing colors see the overridden link visited example for the dark theme in 'exampleSite/layouts/partials/head-custom.html'.
Additional params:
```
[params]
# If set to 'true' a summary will be shown on list overview, otherwise the complete post is shown.

@ -2,11 +2,22 @@
{{ range .Paginator.Pages }}
<article>
<header>
{{ partial "article-header.html" . }}
<h1>
<a href="{{.Permalink}}">{{.Title}}</a>
</h1>
<p>
{{ if .Date }} written {{ if .Params.Author }} by {{ .Params.Author }} {{ end }} on
<time>{{ .Date.Format "Jan 2, 2006" }}</time>{{ end }}
{{ if .Params.categories }}
in
{{ range .Params.categories }}
<a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}">{{ . | humanize }}</a>
{{ end }}
{{ end }}
</p>
</header>
{{ if .Site.Params.useSummary }}
{{ .Summary }}
{{ partial "article-footer.html" . }}
{{ else }}
{{.Content}}

@ -1,9 +1,6 @@
<h1>
{{ if eq (.Scratch.Get "scope") "single" }}
{{.Title}}
{{ else }}
<a href="{{.Permalink}}">{{.Title}}</a>
{{ end }}
{{.Title}}
<a href="{{.Permalink}}">{{.Title}}</a>
</h1>
<p>
{{ if .Date }} written {{ if .Params.Author }} by {{ .Params.Author }} {{ end }} on

@ -1,23 +0,0 @@
{{ define "main" }}
{{ .Scratch.Set "scope" "list" }}
{{ range .Paginator.Pages }}
<article>
<header>
{{ partial "article-header.html" . }}
</header>
{{ if .Site.Params.useSummary }}
{{ .Summary }}
{{ partial "article-footer.html" . }}
{{ else }}
{{.Content}}
{{ partial "article-footer.html" . }}
{{ end }}
</article>
{{ end }}
{{ partial "pagination.html" . }}
{{ end }}

@ -2,7 +2,19 @@
{{ .Scratch.Set "scope" "single" }}
<article>
<header>
{{ partial "article-header.html" . }}
<h1>
{{.Title}}
</h1>
<p>
{{ if .Date }} written {{ if .Params.Author }} by {{ .Params.Author }} {{ end }} on
<time>{{ .Date.Format "Jan 2, 2006" }}</time>{{ end }}
{{ if .Params.categories }}
in
{{ range .Params.categories }}
<a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}">{{ . | humanize }}</a>
{{ end }}
{{ end }}
</p>
</header>
{{ .Content }}
</article>

Loading…
Cancel
Save