diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 8c4dea2..e1848e5 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -19,6 +19,12 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version == [Unreleased] +=== Changed + +* All references to `.Date` are changed with `.PublishDate` as it is more reliable. +The `.PublishDate` can be manually set with the `publishdate` frontmatter variable and if unset, it is the assumed to be the `date` variable. + + === Fixed * Make a few tweaks with CSS. diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 83f9ef8..2b4263a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,7 @@ Otherwise, we take the pages of a section. */ -}} {{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }} {{- end }} -{{- range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }} +{{- range (.Paginate $pages).Pages }}

{{ .Title }}

{{ partial "partials/components/post-meta.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 54b741a..c1b7b5b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -33,11 +33,11 @@ {{- if ne (.PublishDate.Format "2006") "0001" -}} -

{{ i18n "published_on" }}:

+

{{ i18n "published_on" }}:

{{- end }} - {{- if ne .Date .Lastmod }} + {{- if ne .PublishDate .Lastmod }}

{{ i18n "updated_on" }}:

{{- end }} diff --git a/layouts/partials/components.html b/layouts/partials/components.html index 419e8d8..73f23da 100644 --- a/layouts/partials/components.html +++ b/layouts/partials/components.html @@ -53,14 +53,14 @@ If the partial is short enough, it should be put here. {{- define "partials/components/post-meta.html" }}
- {{- if ne (.Date.Format "2006") "0001" -}} -