Closed holic closed 9 years ago
:+1: Seems reasonable for RawGit to request index.html
from GitHub if the requested URL doesn't include a filename.
If you want to open a PR, I'd probably recommend inspecting the request URL somewhere around here and rewriting it when it doesn't contain a filename. If you can't get to it, I'll add it to my todo list. :)
Hi Rgrove, I am currently having issue with exactly this same problem for this URL - https://github.com/CheetahStream/XBMC/tree/master/_repo/ - Im really noob and not following how you guys were able to fix it and adding index.html to the end of my url doesnt work. Any direction you can point me in for some help on getting a working rawgit link to the root of my repo folder? Thanks
@CheetahStream You need to have an index.html file in the directory you're trying to load. This simply checks for an index.html
file for requests to the directory without a filename (i.e. /
).
First off, thanks for rawgit! It's awesome. :sparkles:
We're using a CI to compile our static site, push to a staging branch, and preview it via rawgit. While most of our paths are relative, links to a directory path return a 400 and require adding
index.html
to the end of the URL.See https://rawgit.com/iwantmyname/blog/97d7725/index.html vs. https://rawgit.com/iwantmyname/blog/97d7725/ (also try pagination at the bottom of each page)
Thoughts on rendering
index.html
for directories? Happy to open a PR for it if you think it fits the project :)