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

[Bug] Writing and last modified dates no longer come from git #4507

Closed
5 of 8 tasks
tchajed opened this issue Oct 6, 2024 · 4 comments
Closed
5 of 8 tasks

[Bug] Writing and last modified dates no longer come from git #4507

tchajed opened this issue Oct 6, 2024 · 4 comments
Assignees
Labels
has workaround Having solution to bypass the issue upstream bug Bug comes from upstream, should not be fixed here

Comments

@tchajed
Copy link

tchajed commented Oct 6, 2024

Checklist

  • I am using LTS version of Node.js.
  • I am using the latest v2 version of VuePress and VuePress official plugins.
  • I am using the latest v2 version of vuepress-theme-hope and all plugins in this repo.
  • I followed the docs and I double checked my configuration.
  • I have searched FAQ and I did not find the answer.

Package name

vuepress-theme-hope

Which operating system are you using?

  • macOS
  • Windows
  • Linux

Describe the bug

I'm not seeing git-based writing date or last modified dates in my website. They do show up when running a development server with --debug, but not in production.

I added fetch-depth: 0 to my CI build, and I also tried building locally.

Additional context

This bug doesn't appear in v2.0.0-rc.56 but does in v2.0.0-rc.58, which means it was quite recently introduced.

@tchajed tchajed added the bug Something isn't working label Oct 6, 2024
@tchajed tchajed changed the title [Bug] [Bug] Writing and last modified dates no longer come from git Oct 6, 2024
@tchajed
Copy link
Author

tchajed commented Oct 6, 2024

This is fixable by adding plugins.git: { createdTime: true, updatedTime: true } (or simply plugins.git: true) to the theme config, at the cost of also getting git information during development.

The docs mention this approach only in the context of the dev server. I still think there's a regression in how this is handled.

@CuteReimu
Copy link

CuteReimu commented Oct 8, 2024

{
  plugins: {
    git: process.env.NODE_ENV === "production",
  }
}

CuteReimu added a commit to CuteReimu/fengsheng-doc that referenced this issue Oct 8, 2024
@Mister-Hope
Copy link
Member

This is weird because I did not change any related code at all.

@Mister-Hope Mister-Hope added upstream bug Bug comes from upstream, should not be fixed here has workaround Having solution to bypass the issue and removed bug Something isn't working labels Oct 9, 2024
@Mister-Hope
Copy link
Member

vuepress/core#1612

@Mister-Hope Mister-Hope closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has workaround Having solution to bypass the issue upstream bug Bug comes from upstream, should not be fixed here
Projects
None yet
Development

No branches or pull requests

3 participants