You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having these fields in archetypes/about.md and running "hugo new about/about.md" in hugo 0.37.1 results in a warning message about "date and/or title missing from archetype file". Great!
title = "about us"
description = "about this site"
Date = {{ .Date }}
But having a comment after a field with the string "date" in it results in the warning not being displayed.
e.g. Date = {{ .Date }} # the date
I expected the warning to display only based on the field names. i.e. variables before the equal signs.
The text was updated successfully, but these errors were encountered:
rajeshduggal
changed the title
Archetype warning not displayed when "date" field missing but "date" string found in a field comment
String "date" in an archetype field comment suppresses warning when date field missing
Mar 15, 2018
We do not parse the front matter (we did in earlier versions with lots of other surprising issues). So this validation is just a simple "check for the strings date or title." It was added because earlier we added title/date if they were missing.
I will fix this, but maybe not in the way you think.
Having these fields in archetypes/about.md and running "hugo new about/about.md" in hugo 0.37.1 results in a warning message about "date and/or title missing from archetype file". Great!
title = "about us"
description = "about this site"
Date = {{ .Date }}
But having a comment after a field with the string "date" in it results in the warning not being displayed.
e.g. Date = {{ .Date }} # the date
I expected the warning to display only based on the field names. i.e. variables before the equal signs.
The text was updated successfully, but these errors were encountered: