Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you put a CNAME file in the repo, all of the project pages automagically route.

For example, sheetjs.github.io is configured to handle oss.sheetjs.com: https://github.com/SheetJS/SheetJS.github.io/blob/master/CNA...

The gh-pages branch for js-xls (https://github.com/SheetJS/js-xls/tree/gh-pages), accessible at http://sheetjs.github.io/js-xls, now redirects to http://oss.sheetjs.com/js-xls (and does the right thing so long as the main site repo doesn't have a conflicting directory)

As an example of a conflict, consider http://oss.sheetjs.com/test_files/ . The test_files repo (https://github.com/SheetJS/test_files/tree/gh-pages) is masked by the test_files subdirectory of the main repo (https://github.com/SheetJS/SheetJS.github.io/tree/master/tes...)



Hmm, so changing gh-pages on a project doesn't change anything, because it redirects anyway? That's sort of a bummer.

Thanks for your insight though, much appreciated.


I think "route" was the wrong word. If you set up CNAME in github.com/jdan/jdan.github.io to jordanscales.com, then accessing jdan.github.io/cleaver will result in a request to jordanscales.com/cleaver.

If your repo github.com/jdan/jdan.github.io has a cleaver subdirectory, then it will direct to the directory in the repo (masking the gh-pages branch). However, if you do not have a cleaver subdirectory (which is the case at the moment of writing), the gh-pages branch will be visible


What do you mean that changing gh-pages on a project doesn't change anything? The github pages for the project will continue to be available, but they will be available at www.example.com/project instead of username.github.io/project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: