.Date is empty on index.html #1903

Closed
helmbold opened this Issue Feb 27, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@helmbold

If I insert {{ dateFormat "2006-01-02" .Date }} into the "layouts/index.html" file, the rendered result is "0001-01-01". It works in other templates.

Other variables of "node" types like .URL or .Title are working as expected.

@bep bep added the Bug label Feb 27, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 27, 2016

Member

Thanks for this report.

Member

bep commented Feb 27, 2016

Thanks for this report.

@bep bep closed this in 75cf324 Feb 27, 2016

bep added a commit that referenced this issue Feb 27, 2016

@thepian

This comment has been minimized.

Show comment
Hide comment
@thepian

thepian Oct 21, 2016

I tried something similar, not sure if it's another issue. I render dates in sitemap.xml and for the layouts/index.html it uses 0001-01-01

<lastmod>0001-01-01</lastmod>

thepian commented Oct 21, 2016

I tried something similar, not sure if it's another issue. I render dates in sitemap.xml and for the layouts/index.html it uses 0001-01-01

<lastmod>0001-01-01</lastmod>

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment