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

[FEATURE] 通过 git 读取日期 Reading the date via git #444

Open
117503445 opened this issue May 23, 2024 · 2 comments
Open

[FEATURE] 通过 git 读取日期 Reading the date via git #444

117503445 opened this issue May 23, 2024 · 2 comments

Comments

@117503445
Copy link

Describe the feature you want 描述你的功能需求

https://fixit.lruihao.cn/zh-cn/documentation/content-management/introduction 提到

date: 这篇文章创建的日期时间它通常是从文章的前置参数中的 date 字段获取的,但是也可以在 主题配置 中设置

但我在主题配置中没有找到相关设置。

我的期望是当文章的前置参数没有 date 时,读取 git 中文章文件的最后修改时间作为日期。

Useful reference 有价值的参考

https://github.com/timvink/mkdocs-git-revision-date-localized-plugin

@117503445 117503445 added the enhancement New feature or request label May 23, 2024
@Lruihao
Copy link
Member

Lruihao commented May 23, 2024

理论上你可以设置 frontmatter.toml 来实现。

date = [":git", "date"]

@Lruihao
Copy link
Member

Lruihao commented May 23, 2024

另外,这是属于hugo的设计,主题无法干预。

@Lruihao Lruihao removed the enhancement New feature or request label May 23, 2024
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

2 participants