Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 864
Justin Avatar asked Jan 02 '14 23:01

Justin


People also ask

How do GitHub Pages work?

GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub, optionally runs the files through a build process, and publishes a website. You can see examples of GitHub Pages sites in the GitHub Pages examples collection.

Does GitHub Pages support HTTP?

About HTTPS and GitHub PagesAll GitHub Pages sites, including sites that are correctly configured with a custom domain, support HTTPS and HTTPS enforcement.

What should we be careful of before deploying to GitHub Pages?

Even if the repository is private, the site is still publicly available on the internet — so the developer should always check for any sensitive data before deployment. Naturally, sending sensitive data (e.g. passwords or credit card information) is also unsafe.

Where is GitHub Pages option?

On GitHub, navigate to your site's repository. Under your repository name, click Settings. In the "Code and automation" section of the sidebar, click Pages.


2 Answers

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
like image 200
Justin Avatar answered Oct 21 '22 06:10

Justin


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

like image 1
geg Avatar answered Oct 21 '22 06:10

geg