-
Notifications
You must be signed in to change notification settings - Fork 280
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
gitinfo doesn't work #27
Comments
|
Wow, thx!!! |
同样是 gitinfo 无法显示,设置了 |
看了一下,你使用了 checkout 这个 action,根据其 README 中的描述: # Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '' 默认只会 fetch 最新的一条 commit,所以导致 Hugo 在 build 的时候无法生成 GitInfo。 解决方法是,在你的 workflow 文件中 的下一行,加上 fetch-depth: 0 |
你好,我更改之后依然不行:只有 |
@ichenh 参考下 #107 结尾我的解决办法试试,应该是
这个办法我也试过了,并不能解决问题(参考 我的 action 历史 ),我的尝试结果是,只要不执行 |
感谢你们的帮助,我已经解决了。 首先,修改 checkout 的思路是对的:
其次,如果文件名称包含中文的话就无法显示 gitinfo,我原本按照以下提醒在本地执行命令
但在服务器部署的时候就失败了,我重新查看以上链接,受到启发,在我的 Workflow 中添加
最后,还有一个问题。在 Windows 系统上生成的 editURL 带有反斜杠 |
我之前一直是 Windwos 10,现在使用的是 Manjaro 这个基于 Arch 的 Linux 发行版,如果不取消 checkout 的话 git info 依然是有问题的。 |
这个报错是因为使用的不是扩展版的 Hugo,可能 斜杆的问题,应该是一个 bug,我新建了一个工单来追踪,见 #279 |
修改 另,还有问题的话,请到 Discussions 处提问 谢谢 |
Hey yixiuer, I've been using MemE for a long time. but I found another problem: If my Github's post name(post's filename) is English, then my gitinfo will work, for instance: 组件管理工具 Bit; But if Github's post name(post's filename) have Chinese...gitinfo will not display(like my blog's another most posts)😔I've also checked your blog's writing methods. There are no similarities and differences. I don't know why....
The text was updated successfully, but these errors were encountered: