I wrote a program in Python and used Bootstrap for its frontend.
When I upload the directory on GitHub it shows that the project is 90% JavaScript and only 7.5% Python. I understand that this is happening because of the JS directory in the Bootstrap folder.
I need to display Python as the primary project language for the repo.
I did a little bit of research and learnt that adding the file .gitattributes
to your project is a solution, but I have no idea what to add in that file to get Github ignore JavaScript when assessing the primary language of the project.
I checked out the official .gitattributes manual page but couldn't find a direct solution to this issue.
Here's what the repo looks like
Edit: All the CSS and JS files are in the static/
folder, so I added a .gitattributes
file to the repo and added static/* linguist-vendored
in the first line, however the repo still shows JS as 90% of the language.
static/* linguist-vendored
as the first line in .gitignore, the repo still shows JS as 90% of the project language. I took help from this page hackernoon.com/… I'm going through your links too. – Hake*.js linguist-vendored=false
so all JavaScript files will be counted in statistics. I think you want*.js linguist-vendored
. And you can remove the two first lines. – Pompeii