Does pages.github.com support directory names with a preceeding . (dot)?

左心房为你撑大大i 提交于 2019-12-09 03:43:57

问题


I am using a Maven plugin (jacoco-maven-plugin) which generates a site report whose images and css files are in a folder with a preceeding . (dot) in the name. For example: /site/jacoco/.resources/report.css

When I publish this to my pages.github.com site (using site-maven-plugin), everything is there in my special Github branch (gh-pages).

However, I'm getting 404's when trying to access resources that are in folders with a preceding . (dot) in the folder name.

A simplified example:
https://github.com/justinhrobbins/FlashCards_App/blob/gh-pages/test/.resources/index.html

When I try to access this in my browser i get a 404:
http://justinhrobbins.github.io/FlashCards_App/test/.resources/index.html

However, if I remove the . (dot) from the folder name it works fine:
https://github.com/justinhrobbins/FlashCards_App/blob/gh-pages/test/resources/index.html
http://justinhrobbins.github.io/FlashCards_App/test/resources/index.html

So I'm assuming pages.github.com doesn't support preceeding dot in the folder name (and Googling shows using a preceeding dot may not be a recommended practice anyway) but would appreciate confirmation.

Edit: FYI - when i publish similar to Tomcat it works even with folders with preceeding dot in name


回答1:


I think this is related to pages.github.com's support for Jekyll.

I am now able to get my page.github.com to work with directory names that include a preceding dot (.)

The solution was to add a .nojekyll file in the root of my gh-pages branch.

The following resources helped me solve the issue:

  • Publishing a Maven site having jacoco reports at Github's gh-pages
  • Bypassing Jekyll on GitHub Pages


来源:https://stackoverflow.com/questions/20893913/does-pages-github-com-support-directory-names-with-a-preceeding-dot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!