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

Using lastUpdated in frontmatter is invalid #4448

Closed
4 tasks done
ajiho opened this issue Dec 27, 2024 · 2 comments
Closed
4 tasks done

Using lastUpdated in frontmatter is invalid #4448

ajiho opened this issue Dec 27, 2024 · 2 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@ajiho
Copy link

ajiho commented Dec 27, 2024

Describe the bug

When using lastUpdated as Date in frontmatter, even in non git environments, the input time should be displayed directly

Reproduction

NOT REQUIRED

Expected behavior

foo.md

---
lastUpdated: '2024-12-25T10:30:00Z'
---

# foo
xxxx

Even if I don't use the Git environment, it should still display the time

I have checked and found that the relevant issues have been closed, but when I tested, the time still did not display

I have also created a Vitepress test and found that if using Git, configuring it in FrontMatter can be effective in forcing override

What I mainly want to express is that if frontmatter is forced to set lastUpdated, whether it uses the Git environment or not, it should display this given time

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
    Memory: 1.18 GB / 7.91 GB
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE      
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (131.0.2903.86)
    Internet Explorer: 11.0.19041.3636

Additional context

No response

Validations

@ajiho ajiho added the bug: pending triage Maybe a bug, waiting for confirmation label Dec 27, 2024
@brc-dd
Copy link
Member

brc-dd commented Dec 27, 2024

remove the quotes, adding quotes will treat it like string not date

https://yaml.org/type/timestamp.html

@brc-dd brc-dd closed this as completed Dec 27, 2024
@ajiho
Copy link
Author

ajiho commented Dec 27, 2024

My fault, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants