简体   繁体   中英

How to point github pages to custom html home page

I have started using GutHub-Pages. I am using Jekyll and my gh-pages repository has the following structure:

gh-pages (repo)
+-site
| +-about.md
| +-_config.yml
| +-index.html
+-notes.md

I would like to have htts://<username>.github.io/<repo> point to site/index.html .

How to do this? Thanks

See https://help.github.com/articles/redirects-on-github-pages/ for directions on how to make any github page redirect to another page.

If you want a viewer to see the index.html hosted on github pages when they visit site/index.html , you'll need to talk to whoever owns the DNS for site .

I would like to have htts://<username>.github.io/<repo> point to site/index.html.

You can write a simple html which redirect to the desired page

<html>
  <head>
    <META http-equiv="refresh" content="0;URL=/site/index.html">
  </head>
</html>

/site.index.html设置permalink: /放在最前面。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM