为什么我的 Jekyll 博客不在我的 Github 页面上?
Why is my Jekyll blog not on my Github page?
http://leongaban.github.io/leongaban-10/(<- 显示默认 github 页面主题)
Here is my repo with a jekyll blog 在本地 100% 工作,我确实创建了 gh-pages 分支。下面是博客在我的 github 页面上应该是什么样子的屏幕截图:
我的 _config.yml
中是否需要更改任何内容?
站点设置
title: Leon Gaban
email: leongaban@gmail.com
description: "Leon Gaban"# this means to ignore newlines until "baseurl:"
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://leongaban.com" # the base hostname & protocol for your site
twitter_username: leongaban
github_username: leongaban
# Build settings
markdown: kramdown
您的存储库名称必须以 github.com/github.io 结尾,即重命名您的 https://github.com/leongaban/leongaban-10/ repo to: https://github.com/leongaban/leongaban.github.io
将此添加到您的 _config.yml
:
kramdown:
input: GFM
为了保持相同的降价 GitHub 将使用。
此外,如果是您的用户网站 username.github.io
,最好将其移至 master
分支。 gh-pages
分支应该只应用于项目网站。
您的 _site
文件夹不应该存在。它包含已构建的站点。通常它对于本地预览很有用,当您使用不会自动构建 Jekyll 的服务(如 Apache 服务器)进行托管时。此外,当您使用 GitHub 不允许的 Jekyll 插件时,您选择在本地构建站点并仅将静态站点上传到 GH。
我看到两种方法:如果您删除 _site
文件夹并将您的项目移动到 master 分支,或者您删除其余内容并仅将 _site 文件夹的内容上传到您的仓库(不是文件夹本身)。
希望对您有所帮助!
http://leongaban.github.io/leongaban-10/(<- 显示默认 github 页面主题)
Here is my repo with a jekyll blog 在本地 100% 工作,我确实创建了 gh-pages 分支。下面是博客在我的 github 页面上应该是什么样子的屏幕截图:
我的 _config.yml
中是否需要更改任何内容?
站点设置
title: Leon Gaban
email: leongaban@gmail.com
description: "Leon Gaban"# this means to ignore newlines until "baseurl:"
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://leongaban.com" # the base hostname & protocol for your site
twitter_username: leongaban
github_username: leongaban
# Build settings
markdown: kramdown
您的存储库名称必须以 github.com/github.io 结尾,即重命名您的 https://github.com/leongaban/leongaban-10/ repo to: https://github.com/leongaban/leongaban.github.io
将此添加到您的 _config.yml
:
kramdown:
input: GFM
为了保持相同的降价 GitHub 将使用。
此外,如果是您的用户网站 username.github.io
,最好将其移至 master
分支。 gh-pages
分支应该只应用于项目网站。
您的 _site
文件夹不应该存在。它包含已构建的站点。通常它对于本地预览很有用,当您使用不会自动构建 Jekyll 的服务(如 Apache 服务器)进行托管时。此外,当您使用 GitHub 不允许的 Jekyll 插件时,您选择在本地构建站点并仅将静态站点上传到 GH。
我看到两种方法:如果您删除 _site
文件夹并将您的项目移动到 master 分支,或者您删除其余内容并仅将 _site 文件夹的内容上传到您的仓库(不是文件夹本身)。
希望对您有所帮助!