Adjusted lastmod assignment within configuration file #4435
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


This PR fixes the dates displayed within our guides.
Problem
Currently, Hugo uses the date from GitHub (https://gohugo.io/variables/git/#lastmod) to decide when an article was last modified. It does not used the
modifiedparameter in the front matter. This results in most of the dates listed on our guides to be incorrect:Fix
This PR adjusts the
lastmodassignment order in the configuration file to prioritize the "lastmod" / "modified" (an alias of lastmod) front matter parameter ahead of the information from git.See Configure Dates in Hugo's documentation for details on adjusting this.
Bug or feature?
It seems like the modified parameter was purposefully deprecated in favor of the git date. See PR #2284. I don't believe we should use this as large changes to our git repository (like the new docs site) or small changes to front matter or copy on guides could dramatically alter the dates when, in reality, the guides haven't really been updated as it concerns our customers or search engines. Keeping the dates just within the front matter adds a lot more control over this.
Important dates
Here are the dates I think we should emphasize on a document, in order of importance.
modifieddate. Provides users a reference for when the content was last meaningfully updated.publisheddate. Provides users a reference for when the content was initially published.