Domanda

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

È stato utile?

Soluzione

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:

Altri suggerimenti

As mentioned here you can also configure this with Jekyll itself. Whitelist files/directories by adding them to _config.yml in the root directory.

include:
  - .my-hidden-folder

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top