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

最后更新时间始终为最后一次提交的时间 #2303

Closed
4 tasks done
gittosuperfly opened this issue Apr 27, 2023 · 1 comment
Closed
4 tasks done

最后更新时间始终为最后一次提交的时间 #2303

gittosuperfly opened this issue Apr 27, 2023 · 1 comment

Comments

@gittosuperfly
Copy link

Is your feature request related to a problem? Please describe.

dist中的构建产生的html文件中的__VP_HASH_MAP__ 顺序不定,哪怕对md文件不进行任何修改,导致只要重新build一次就会使dist中的大量文件发生改动。

另外,如果有一个md文件发生改动,就会导致构建生成的所有html中的__VP_HASH_MAP__ 中的hash码变化。这会导致几乎所有文件都发生了改动。

我不清楚 vitepress中 最后更新时间 是否是按照文件最后一次改动时间算的,目前的问题是只要改一个文件所有文件的最后更新时间都会更新为最新的这个时间。感觉有很大概率是和上面描述的__VP_HASH_MAP__ 有关。

我的思路是:

改了一个md文件并重新构建 -> 所有md文件生成的html中的__VP_HASH_MAP__ 发生了变化,导致所有html文件都发生了更改 -> 文件最后更改时间全部更新为此时此刻

Describe the solution you'd like

有什么办法让每个文件都有自己的最后更新时间吗? 非常感谢!

Describe alternatives you've considered

No response

Additional context

No response

Validations

@brc-dd
Copy link
Member

brc-dd commented Apr 27, 2023

有什么办法让每个文件都有自己的最后更新时间吗?

That's what happens right now. The last updated time is the time that specific file was committed last time (and __VP_HASH_MAP__ has nothing to do with this). All the pages can have different date/times. For example on

I see you closes the issue, was it resolved?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants