diff --git a/layouts/book/all.html b/layouts/book/all.html index 2e81a33..616c6aa 100644 --- a/layouts/book/all.html +++ b/layouts/book/all.html @@ -19,10 +19,10 @@ {{ end }} {{- range ($indexScratch.Get "sections").ByTitle -}} -

{{ .Title }}

+

{{ .Title }}{{- if .Draft -}} :: Draft {{- end -}}

{{- end -}} diff --git a/layouts/book/chapters.html b/layouts/book/chapters.html index 7a74400..c83bf80 100644 --- a/layouts/book/chapters.html +++ b/layouts/book/chapters.html @@ -7,11 +7,17 @@ {{ partial "content.header.html" . }} +{{ with .Content }} +
+{{ . }} +
+{{ end }} +
diff --git a/layouts/book/volumes.html b/layouts/book/volumes.html index a401f27..d714c2b 100644 --- a/layouts/book/volumes.html +++ b/layouts/book/volumes.html @@ -7,11 +7,17 @@ {{ partial "content.header.html" . }} +{{ with .Content }} +
+{{ . }} +
+{{ end }} +
diff --git a/layouts/index.html b/layouts/index.html index 9c07738..08414c3 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,9 +7,10 @@
{{ end }}
-{{ range (.Paginate .Site.RegularPages).Pages }} -{{/* range where .Site.RegularPages "Type" "posts" */}} -{{ if ne .Draft true}} +{{ $pgFilter1 := where .Site.RegularPages "Draft" false }} +{{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }} +{{ $pgFilter := $pgFilter1 | intersect $pgFilter2 }} +{{ range (.Paginate $pgFilter).Pages }}

{{ if .IsNode }} {{ .Title}} @@ -23,8 +24,6 @@ {{ else }}

{{ truncate 140 .Summary }}

{{ end }} - -{{ end }} {{ end }}

diff --git a/layouts/partials/content.header.html b/layouts/partials/content.header.html index e20e82f..b87811e 100644 --- a/layouts/partials/content.header.html +++ b/layouts/partials/content.header.html @@ -2,30 +2,27 @@

{{- .Title -}}{{- if .Draft -}} :: Draft {{- end -}}

+{{- if .Params.subtitle -}} +

{{ .Params.subtitle }}

+{{- end -}} -{{- if .IsPage -}} - {{- if .Params.subtitle -}} -

{{ .Params.subtitle }}

+{{- if and (.IsPage) (.Params.meta) -}} + + {{- if .Params.author -}} +

{{ .Params.author }}

{{- end -}} - {{- if .Params.meta -}} - + {{- if not .Params.hidedate -}} +

{{ .Date.Format "2006-01-02" }}

{{- end -}} + + {{- if not .Params.hidereadtime -}} + {{ .ReadingTime }} min read  + {{- end -}} + + {{- range .Params.tags -}} + {{ . }}  + {{- end -}} +
{{- end -}}