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

Post dates missing when deploying via Netlify #1346

Closed
henningninneh opened this issue Sep 20, 2019 · 3 comments
Closed

Post dates missing when deploying via Netlify #1346

henningninneh opened this issue Sep 20, 2019 · 3 comments

Comments

@henningninneh
Copy link

henningninneh commented Sep 20, 2019

Description

After building the site via Netlify, post dates are missing in the blog widget and in each post. Instead, the date when the post was last updated is shown below the post title. This occurs despite setting enableGitInfo = false in config.toml.

Steps to reproduce

  1. In config.toml, set enableGitInfo = false.
  2. Create a new post with hugo new --kind post post/test.
  3. Start the Hugo server with hugo server start.
  4. Load page in browser and observe that the post dates are rendered as expected.
  5. Commit changes to local git repository. (Optional: restart local hugo server and observe that the post dates are still rendered as expected.).
  6. Push changes to GitHub and wait for Netlify to build the site.
  7. Open the page in browser and observe that post dates are missing and that "last updated on [...]" is shown instead.

Expected result

Post dates should be shown in posts and on the blog widget below the title. "last updated on [...]" should be ommitted.

Actual result

Post dates are missing in posts and on the blog widget below the title. "last updated on [...]" (last git commit) is shown instead.

Notes

Academic Theme version: 4.3.1
Hugo Version on local machine (where no issue is encountered): v0.55.6 freebsd/386
Thank you!

@gcushen
Copy link
Collaborator

gcushen commented Sep 20, 2019

As you pointed out, this is not a bug with Academic and works fine when you render it locally.

You may want to check your netlify.toml file if you haven't already as that is where your Netlify settings are stored and it is where you can disable HUGO_ENABLEGITINFO for your Netlify site.

Feel free reach out to Hugo team (who implemented enableGitInfo ) on the Hugo forums or the Netlify community.

@gcushen gcushen closed this as completed Sep 20, 2019
@henningninneh
Copy link
Author

I understand. Thanks for explaining how to disable the whole thing! Before I reach out to Hugo and Netlify, could you point me to some relevant lines in your code, so I can give them a pointer?

@tuhinsharma121
Copy link

@henningninneh
Screenshot 2019-11-19 at 11 55 23 PM

chezou added a commit to chezou/chezo.uno that referenced this issue Dec 17, 2019
 to show original post date rather than git commit date as updated date.
HugoBlox/hugo-blox-builder#1346
jtlocsei added a commit to jtlocsei/academic-kickstart that referenced this issue Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants