New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Site.LastChange should be time of newest content #2909

Closed
moorereason opened this Issue Jan 7, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@moorereason
Contributor

moorereason commented Jan 7, 2017

Currently, .Site.LastChange is set to the first page in the default sort order (hugolib/site.go#L135), which may not be the most recent content if weights were added to the front matter.

See https://discuss.gohugo.io/t/4992

@moorereason moorereason added the Bug label Jan 7, 2017

@moorereason moorereason self-assigned this Jan 7, 2017

@moorereason moorereason added this to the v0.19 milestone Jan 7, 2017

@moorereason

This comment has been minimized.

Show comment
Hide comment
@moorereason
Contributor

moorereason commented Jan 7, 2017

moorereason added a commit to moorereason/hugo that referenced this issue Feb 18, 2017

hugolib: Fix .Site.LastChange setting
If weights are added to the content front matter, the default sort order
can't be relied upon to set `.Site.LastChange`.

Fixes #2909

bep added a commit to bep/hugo that referenced this issue Feb 19, 2017

hugolib: Fix .Site.LastChange
This commit makes sure that the `.Site.LastChange` is fetched from the latest page modification date.

Previously, this value was fetched from the last page in the default page sort, which may not be the last by date
if weight is set.

Fixes #2909
Closes #2910

@bep bep closed this in #3058 Feb 19, 2017

bep added a commit that referenced this issue Feb 19, 2017

hugolib: Fix .Site.LastChange
This commit makes sure that the `.Site.LastChange` is fetched from the latest page modification date.

Previously, this value was fetched from the last page in the default page sort, which may not be the last by date
if weight is set.

Fixes #2909
Closes #2910
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment