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

CI检查:增加文章的文件名检查,避免Windows和Linux开发者或译者不兼容 #202

Open
shandianchengzi opened this issue Aug 30, 2024 · 3 comments
Assignees

Comments

@shandianchengzi
Copy link
Contributor

现在的新文章sources/general/What is a "good" Linux Kernel bug.md通不过Windows文件命名检查……

@mudongliang
Copy link
Member

这是个好问题

@mudongliang
Copy link
Member

mudongliang commented Nov 25, 2024

@inscripoem 帮忙看看这个问题怎么解决?

@inscripoem
Copy link
Member

inscripoem commented Nov 25, 2024

在 VS Code 的 Markdown 插件文档中有对 Markdown 文件的命名建议

这个建议提出除非在约定俗成(比如 README.md)的文件名情况下,文件名与目录名都应该使用 Kebab case,并添加了每个单词仅使用小写 ASCII 字母(不使用数字)的额外约束。这引出了以下的正则表达式:

/^[a-z]+(-[a-z]+)*$/

我建议我们可以统一遵循这种命名规范,它可以通过正则表达式来检查。同时,连字符的使用也有助于 SEO,因为搜索引擎会将 - 视作单词的分隔符,而将 _ 和单词视为整体。

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

3 participants