我遵循本指南讓我開始使用Jekyll:Setting up your GitHub Pages site locally with Jekyll,但我正在對GitHub企業做這個。我的回購是在https://github.company.com/myorg/myrepo
,並從https://pages.github.company.com/myorg/myrepo
(或https://github.company.com/pages/myorg/myrepo
)提供GitHub頁面。Jekyll與GitHub企業
教程步驟bundle exec jekyll new . --force
創建了一個簡單的模板網站,我修改_config.yml
包括這樣的:
baseurl: ""
url: "https://pages.github.company.com/myorg/myrepo"
repository: "myorg/myrepo"
但我跑bundle exec jekyll serve
後,我看到它走出去公共GitHub上:
Generating...
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo/pages: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo/contributors?per_page=100: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/orgs/myorg: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/users/myorg/repos?per_page=100&type=public: 404 - Not Found // See: https://developer.github.com/v3
GitHub Metadata: GET https://api.github.com/repos/myorg/myrepo/releases?per_page=100: 404 - Not Found // See: https://developer.github.com/v3
看着這個:Repository metadata on GitHub Pages,我想我可以覆蓋_config.yml
中的一些GitHub元數據設置指向GitHub Enterprise,所以我添加了這個:
github:
hostname: github.company.com
pages_hostname: pages.github.company.com
api_url: https://api.github.company.com
repository_url: https://github.company.com/myrepo/myorg
但它沒有改變任何東西,它仍然公開GitHub API。在此
展望:github-metadata,我試圖重寫API:
$ PAGES_API_URL="https://api.github.company.com" bundle exec jekyll serve
但它也不能工作。
該網站確實「建立」,但如果我去https://127.0.0.1:4000/
該網站的標題鏈接在那裏帶我到http://github.com/pages/myorg/myrepo/
。我如何才能實際使用GitHub Enterprise?
您必須將您的回購商名稱重命名爲:my_company.github.io並且就是這樣 –
這就是說,如果我想創建一個完整的用戶/組織頁面嗎?我只是想創建一個項目頁面,「myorg/myrepo」。 –