问题
I have recently started using github pages and so far I am using the default index.html as my main page. How do I use another page as my default page? For example if in my gh-pages branch I have my html in a folder src/. How do I set ./src/index.html as my default instead of ./index.html?
回答1:
Create dummy index.html and put this in the header
<meta http-equiv="refresh" content="0; url=http://mysite.github.io/folder/index.html" />
Change http://mysite.github.io/folder/index.html to your desired url.
回答2:
I though Steven Penny's comment was good, but on Windows it was not super straightforward to create a symlink inside git. Only more recent versions of git-for-windows support symlinks.
If you enable support via the core.symlinks
config variable you can mklink index.html src\file.html
and gh-pages will show file.html as the landing page.
来源:https://stackoverflow.com/questions/27330188/use-other-than-index-html-for-github-pages