I’ve recently started experimenting with hosting my dot files on a static git page generator. However, when I try to view any dot file (e.g., .gitignore files) I get a Page Not Found error.
I have no issue viewing these dot/hidden file locally, but they lead to 404 when deployed. How can I solve this?
Here is a link to my dotfiles: Files - arch - Arch Linux system dot files and scripts.
The only resource I could find was this old github issue that mentions redirects, but I can’t make sense of how to apply it to my case: dotfiles are ignored by 'netlify deploy' · Issue #11 · netlify/cli · GitHub
Any hint would be appreciated. Thank you.
Simply put, you can’t do what you’re trying to do. Those files are ignored during build.
Hi, thank you for your reply.
Just to clarify, I don’t mean that I want to see files ignored by .gitignore, I understand that the goal of a .gitignore is to “ignore” files on build.
I meant that I would like to be able to see the contents of the .gitignore files itself, as well as any file that is preprended with a dot.
As an example, on this website (.gitignore - bmf - bmf (Bayesian Mail Filter) 0.9.4 fork + patches), you’re able to see the contents of the .gitignore file.
However, on my site, my dotfiles, even when they’re not ignored (Files - arch - Arch Linux system dot files and scripts.) return a 404 page.
Is it still the case that Netlify simply doesn’t process these files?
Yes, when I meant those files are ignored during build, I wasn’t talking about them being ignored by
.gitignore. I was talking about Netlify’s build systems ignoring file names starting with
.. Even if the file is not in
.gitignore, it will be ignored.