projects
/
kengrimes.com
/
theme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c1fdc7c
)
using .Page.Description instead of .Page.Params.heading
author
kengrimes
<ken@kengrimes.com>
Fri, 20 Apr 2018 20:48:22 +0000
(13:48 -0700)
committer
kengrimes
<ken@kengrimes.com>
Fri, 20 Apr 2018 20:48:22 +0000
(13:48 -0700)
layouts/_default/baseof.html
patch
|
blob
|
history
diff --git
a/layouts/_default/baseof.html
b/layouts/_default/baseof.html
index
d73bc08
..
ddfb8b0
100644
(file)
--- a/
layouts/_default/baseof.html
+++ b/
layouts/_default/baseof.html
@@
-15,19
+15,12
@@
{{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
<img src="{{ $ph }}">
<div>
{{- $ph := cond (or (not .Params.header) (not (fileExists (printf "static/%s" .Params.header)))) $sh .Params.header }}
<img src="{{ $ph }}">
<div>
- <p>{{- if not .Page.Params.heading }}
- {{ .Page.Title }}
- {{- else if eq (printf "%T" .Page.Params.heading) "string" }}
- {{ .Page.Params.heading }}
- {{- else }}
- {{- index .Page.Params.heading 0 }}
- {{- if (gt (len .Page.Params.heading) 1) }}
- {{- range after 1 .Page.Params.heading -}}
- <br>
- {{ . }}
- {{- end -}}
- {{- end -}}
- {{- end }}
+ <p>
+ {{- if not .Page.Description }}
+ {{ .Page.Title }}
+ {{- else }}
+ {{ replaceRE "\n\n" "<br>\n" .Page.Description | safeHTML }}
+ {{- end }}
</p>
</div>
</header>
</p>
</div>
</header>