【问题标题】:How to point github pages to custom html home page如何将 github 页面指向自定义 html 主页
【发布时间】:2016-07-08 13:28:22
【问题描述】:

我已经开始使用 GutHub-Pages。我正在使用Jekyll,而我的gh-pages 存储库具有以下结构:

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

我想让htts://<username>.github.io/<repo> 指向site/index.html

如何做到这一点?谢谢

【问题讨论】:

标签: git github jekyll github-pages


【解决方案1】:

我想让htts://<username>.github.io/<repo> 指向site/index.html。

您可以编写一个简单的 html 来重定向到所需的页面

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

【讨论】:

    【解决方案2】:

    有关如何使任何 github 页面重定向到另一个页面的说明,请参阅 https://help.github.com/articles/redirects-on-github-pages/

    如果您希望查看者在访问 site/index.html 时看到托管在 github 页面上的 index.html,您需要与拥有 site 的 DNS 的人交谈。

    【讨论】:

      【解决方案3】:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-02-10
        • 1970-01-01
        • 2023-03-11
        • 2015-04-18
        • 2022-11-21
        • 2012-11-29
        • 1970-01-01
        • 2020-06-17
        相关资源
        最近更新 更多