Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Pages are always "Last updated: a minute ago" #563

Closed
specterflare opened this issue Mar 6, 2021 · 14 comments · Fixed by #587
Closed

Pages are always "Last updated: a minute ago" #563

specterflare opened this issue Mar 6, 2021 · 14 comments · Fixed by #587
Labels
Bug Issue brings a bug to light.

Comments

@specterflare
Copy link
Contributor

No matter what, every page on the site says "Last updated: a minute ago". I'm not sure when it broke, but I do have distinct memories of it not being broken.

@specterflare
Copy link
Contributor Author

Anyone?

@ghostbear
Copy link
Contributor

The package handling "Last updated:" is probably broken @mr-hope/vuepress-plugin-last-update. And I can't find the documentation for it, so I have a suspicion that it has turned into @mr-hope/vuepress-plugin-git.

@arkon
Copy link
Contributor

arkon commented Mar 9, 2021

Someone could try checking out old commits to see when it broke, but I agree with @ghostbear that it probably broke on an update to that plugin dep.

@ghostbear
Copy link
Contributor

Just noticed that the PR #565, #567 and #568 seem to display the correct time for "Last updated"
Screenshot from 2021-03-09 19-18-53

@scb261
Copy link
Contributor

scb261 commented Mar 13, 2021

Maybe it should use @vuepress/plugin-last-updated? Idk how to test it, since both local and netlify show it correctly even with current config

@Soitora
Copy link
Member

Soitora commented Mar 13, 2021

We changed from that one to Mr-Hope because Vuepress didnt offer any flexibility. I believe the new one from Mr-Hope is the @mr-hope/vuepress-plugin-git as ghostbear mentioned.

@ghostbear
Copy link
Contributor

Looks like #587 didn't fix the problem. Starting to think that it has something to do with the build script because it works fine locally

@ghostbear ghostbear reopened this Mar 16, 2021
@Soitora
Copy link
Member

Soitora commented Mar 16, 2021

Starting to think that it has something to do with the build script because it works fine locally

Also works fine on Netlify, but except for the change 3 days ago (which didn't break it), we haven't made changes to the build script for almost a year

@ghostbear
Copy link
Contributor

Hmm, it's probably actions/checkout@v2 because it only gets the latest commit.
And by doing a shallow clone --depth 1 I'm able to recreate the issue, so it may be actions/checkout@v2 that changed at some point

@Soitora
Copy link
Member

Soitora commented Mar 16, 2021

As I mentioned on discord#website, we could switch the site to Netlify and get an open-source team (https://www.netlify.com/legal/open-source-policy)

We'd need a Code of Conduct for that though, so looking into some simple ones

@Flat
Copy link
Contributor

Flat commented Mar 16, 2021

As I mentioned on discord#website, we could switch the site to Netlify and get an open-source team (https://www.netlify.com/legal/open-source-policy)

We'd need a Code of Conduct for that though, so looking into some simple ones

Although I've recommended this in Discord I'll add it here as well for discussion.
https://github.com/karlgroves/dontbeadick

@yhunko
Copy link
Contributor

yhunko commented May 6, 2021

I can confirm it, but for me it displays "a few seconds ago".
I doubt it is related to browser, but I represented it on latest Chrome on Android 11.

I can add that on my Vuepress website which is hosted on Vercel and uses default @vuepress/last-updated plugin it works as expected on local and on hosting. Here is a config line.
Moved

@yhunko
Copy link
Contributor

yhunko commented Jun 7, 2021

Recently saw this blog post and I believe it describes the exact same issue.

To summarize what I learned from it:
you can try changing your Workflow (push.yml) by adding:

steps:
  - uses: actions/checkout@v2
    with:
      fetch-depth: 0

@arkon arkon added the Bug Issue brings a bug to light. label Jul 31, 2021
@arkon
Copy link
Contributor

arkon commented Jul 31, 2021

That seemed to have fixed it (327ec78).

Thanks @yegorgunko !

@arkon arkon closed this as completed Jul 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Issue brings a bug to light.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants