added post param to hide date from single post view
This commit is contained in:
parent
35cdd183eb
commit
f9c98de489
|
@ -272,6 +272,7 @@ Every post can have various parameters in the frontmatter, here are some that yo
|
||||||
- `tags`: a list of tags for your post
|
- `tags`: a list of tags for your post
|
||||||
- `image`: a link to a feature image for the article, shown in the preview as well
|
- `image`: a link to a feature image for the article, shown in the preview as well
|
||||||
- `comments`: boolean, if true it enables comments for the current post, if false it disables them (default is true)
|
- `comments`: boolean, if true it enables comments for the current post, if false it disables them (default is true)
|
||||||
|
- `showDate`: boolean, true by default, if false hides the date. Useful for non-article pages where the date isn't important
|
||||||
|
|
||||||
# Does *Ficurinia* mean anything?
|
# Does *Ficurinia* mean anything?
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
{{- partial "inject/content-before.html" . -}}
|
{{- partial "inject/content-before.html" . -}}
|
||||||
<article class="card {{ if .Site.Params.discreteCards }}discrete{{ end }} single">
|
<article class="card {{ if .Site.Params.discreteCards }}discrete{{ end }} single">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
{{ if (.Params.showDate | default true) }}
|
||||||
<p class="date">
|
<p class="date">
|
||||||
<span title="Date"> </span>
|
<span title="Date"> </span>
|
||||||
{{ .Date.Format "2006-01-02" }}
|
{{ .Date.Format "2006-01-02" }}
|
||||||
</p>
|
</p>
|
||||||
|
{{ end }}
|
||||||
{{ if .Params.Image }}
|
{{ if .Params.Image }}
|
||||||
<img src="{{ .Params.Image }}" alt="" />
|
<img src="{{ .Params.Image }}" alt="" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue