Skip to content
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

.LastMod display logic is not useful with .GitInfo #259

Closed
mika-fischer opened this issue Aug 2, 2022 · 1 comment
Closed

.LastMod display logic is not useful with .GitInfo #259

mika-fischer opened this issue Aug 2, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@mika-fischer
Copy link

What happened?

a041f09 improved the display of .LastMod so that it's only displayed when different from .Date.

However, when using .GitInfo to automatically populate .LastMod from the date of the last commit touching the file in question, this logic pretty much never fires and .LastMod is always displayed.

What's really needed is to display .LastMod only if the formatted .LastMod is different from the formatted .Date.

If that's difficult, it would help to change the ne here to a lt so that I can manually set the article date to a date after the commit that published the article and prevent the display of .LastMod this way.

Theme version

v2.3.1

Hugo version

v0.101.0

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Relevant Hugo log output

No response

@mika-fischer mika-fischer added the bug Something isn't working label Aug 2, 2022
@jpanther
Copy link
Owner

Thanks for the report, @mika-fischer. I'll make a change so that both dates are formatted prior to checking their values. Hopefully this will address the issue you're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants