修复 github 项目的语言属性
文章目录
issue
Laravel 开源电商项目源码 被 github 判断认为是 HTML 项目,但是实际项目并没有 html 代码。

这就尴尬了,只有默默的通过 google 搜索 github change project type 发现这篇文章:How to Change Repo Language in GitHub
简单来说只要在项目根目录下添加 .gitattributes 文件,然后通过设置相关目录或者类型文件标记为相关语言即可。
gitattributes
支持的属性语法如下:
- linguist-documentation
- linguist-language
- linguist-vendored
- linguist-generated
- linguist-detectable
usage
*.css linguist-vendored
*.js linguist-language=Vue
modules/* linguist-language=PHP
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论