added extra content option for more home page like post views
This commit is contained in:
parent
79bc934c75
commit
18a213cf31
6 changed files with 50 additions and 36 deletions
|
|
@ -1,15 +1,8 @@
|
|||
{{ define "main" }}
|
||||
<h2>
|
||||
{{ $title := .Title }}
|
||||
{{ $section := .Section | humanize }}
|
||||
{{ if and (ne $section $title) (ne $section "Tags") (ne $title (printf "%ss" $section)) }}
|
||||
{{ $section }}:
|
||||
{{ end }}
|
||||
{{ if and (eq $section "Tags") (ne $section $title) }}Tag: #{{ end }}{{ $title }}
|
||||
</h2>
|
||||
<ul class="list">
|
||||
{{ range .Pages }}
|
||||
<li><span class="date">{{ .Date.Format "2006-01-02" }}</span> <a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ if in (site.Params.extraContentDirs | default (slice)) .Section }}
|
||||
<h1>{{ .Section | humanize }}</h1>
|
||||
{{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" .Pages) -}}
|
||||
{{ else }}
|
||||
{{- partial "simple_posts_list.html" . -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue