diff --git a/exampleSite/content/en/blog/no-date.md b/exampleSite/content/en/blog/no-date.md new file mode 100644 index 0000000..d907572 --- /dev/null +++ b/exampleSite/content/en/blog/no-date.md @@ -0,0 +1,6 @@ +--- +title: "Undated post" +tags: ["words"] +--- + +I was born yesterday, tomorrow. \ No newline at end of file diff --git a/layouts/blog/list.html b/layouts/blog/list.html index c2c6583..775277b 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -6,7 +6,7 @@ {{ if .Site.Params.home.showLatest | default true }}

{{ i18n "index_blog_latestPosts" . }}

{{ range first 1 .Pages.ByPublishDate.Reverse }} -
{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} +
{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}

{{ .Title }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index fcbe513..35d4d4c 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -10,7 +10,7 @@ {{ .Title }}

- {{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | + {{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} |{{ end }} {{ i18n "blog_readingTime" .ReadingTime }}
{{ if or .Site.Params.share.twitter .Site.Params.share.facebook .Site.Params.share.pinterest .Site.Params.share.googlePlus }} diff --git a/layouts/partials/blog/li.html b/layouts/partials/blog/li.html index 1f13118..db6359b 100644 --- a/layouts/partials/blog/li.html +++ b/layouts/partials/blog/li.html @@ -1,5 +1,5 @@ {{ range .Pages.ByPublishDate.Reverse }}
  • - {{ .Title }} - {{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} + {{ .Title }}{{ if .Params.date }} - {{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}
  • {{ end }} diff --git a/layouts/partials/home/blog.html b/layouts/partials/home/blog.html index d79eab9..2c2b55b 100644 --- a/layouts/partials/home/blog.html +++ b/layouts/partials/home/blog.html @@ -5,7 +5,7 @@ {{ if .Site.Params.home.showLatest | default true }}

    {{ i18n "index_blog_latestPosts" . }}

    {{ range first 1 .Pages.ByPublishDate.Reverse }} -
    {{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} +
    {{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }}

    {{ .Title }}

    {{ .Summary }}