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

2

9

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

Kinky answered 2/1, 2014 at 23:30 Comment(0)
K
21

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:

Kinky answered 3/1, 2014 at 18:22 Comment(1)
Thank you so much for sharing this! I was about to throw my computer out the window when I found your...umh, more constructive...answer here!Dub
H
4

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

Hone answered 24/6, 2021 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.