jashkenas / underscore

JavaScript's utility _ belt
https://underscorejs.org
MIT License
27.33k stars 5.53k forks source link

gh-pages is hiding the internal modules in the modular annotated source #2873

Closed jgonggrijp closed 4 years ago

jgonggrijp commented 4 years ago

In the modular annotated source, if you click on a link that leads to an internal module, such as _setup.js, you get a 404 page instead of the annotated source of that module. This is despite the fact that the corresponding HTML files were correctly pushed to the gh-pages branch.

It appears that GitHub Pages is hiding all files with a name that starts with an underscore, but the documentation makes no mention of this. I have submitted a support ticket to the GitHub team, but they have a big disclaimer that responses may be slower due to COVID-19.

I tried fixing the issue myself, but failed. Based on the suspicion that Jekyll, which is enabled by default, may be the culprit, I enabled GitHub Pages on my own fork and pushed a .nojekyll file. Unfortunately, it made no difference.

Please bear with us while we await support. In the meanwhile, you can download the source (or checkout from git) to browse the modular annotated source from your local disk. It's in the docs/modules directory.

jgonggrijp commented 4 years ago

Update: the .nojekyll did actually work, but the effect somehow took rather long to manifest. I also got a response from GitHub support sooner than I expected, which prompted me to try again and discover that the issue was fixed on my own fork. I have just pushed e634b8b to the gh-pages branch here on the main repo, so the modular annotated source should be fine within the next half hour or so.

For future reference: the feature is mentioned in the GitHub docs over here: https://docs.github.com/en/github/working-with-github-pages/about-github-pages-and-jekyll#configuring-jekyll-in-your-github-pages-site

jgonggrijp commented 4 years ago

Just checked, everything works as intended now.