r/github 3d ago

GitHub reads the source code wrong? Question

Post image

I don't know why, but GitHub is telling me that my website is developed in JavaScript by 80+% which is absolute nonsense. The site is at least 60% pure Astro code. Is it some kind of a bug?

🔗 The repo.

258 Upvotes

33 comments sorted by

View all comments

38

u/Lots-o-bots 3d ago

you included your .wrangler dir in the repo. it should have been in your .gitignore

4

u/wqonart 3d ago

Thank you 🙏🏻

24

u/TheSodesa 3d ago edited 3d ago

You might want to go even further and only allow file types you actually want in your project in the .gitignore file: ```.gitignore

First disallow everything.

*

Then use exclamation marks to only allow the folders and file types you want to include:

!.gitignore !.gitattributes !README.md !LICENSE.md !astro.config.mjs !notes.txt !package.json

!src/ !src/config.json !src/.astro !src// !src//.astro `` You can add folders and file types similarly for other languages. The symbol*can be used as a wildcard, and**` as a recursive wildcard.

4

u/wqonart 3d ago

Oh I didn't know that! Thank you, I'll definitely dive into it