diff --git a/README.md b/README.md index d477afe..28c245f 100644 --- a/README.md +++ b/README.md @@ -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 - `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) +- `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? diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8cb6586..c6bc4b0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,10 +2,12 @@ {{- partial "inject/content-before.html" . -}}

{{ .Title }}

-

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

+ {{ if (.Params.showDate | default true) }} +

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

+ {{ end }} {{ if .Params.Image }} {{ end }} diff --git a/layouts/partials/article_card.html b/layouts/partials/article_card.html index 637a759..6834193 100644 --- a/layouts/partials/article_card.html +++ b/layouts/partials/article_card.html @@ -4,15 +4,15 @@ {{ .Title }}

- - {{ .Date.Format "2006-01-02" }} - {{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }} - | - - {{ range sort .Params.tags }} - #{{ . }} + + {{ .Date.Format "2006-01-02" }} + {{ if and (site.Params.tagsInArticlePreview | default true) .Params.tags }} + | + + {{ range sort .Params.tags }} + #{{ . }} + {{ end }} {{ end }} - {{ end }}

{{ if .Site.Params.imageInArticlePreview }} {{ if .Params.Image }}