【发布时间】:2021-08-15 15:50:17
【问题描述】:
这确实是一件小事,但我无法忘记。
当使用 jekyll serve 在本地运行 gh-pages 时,我得到了“在 Github 上查看”按钮,但它在实时页面上丢失了。一切都是最新的,所有文件在本地和实时都是相同的。
_config.yml
keyword: "NFT, Crypto, Art, Token, Promotions, New Artists"
url: "https://creepybits.github.io" # your host, for absolute URL
github_repo: "https://github.com/creepybits/creepybits.github.io.git" # you code repository
default.html
<header class="page-header" role="banner">
<h1 class="project-name">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
{% endif %}
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
{% endif %}
</header>
我就是看不出问题出在哪里。
编辑:
宝石文件
source "https://rubygems.org"
gem "github-pages", "~> 217", group: :jekyll_plugins
gem 'webrick', '~> 1.3', '>= 1.3.1'
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
gem "jekyll-seo-tag", "~> 2.7.1"
gem "jekyll-textile-converter"
gem 'jekyll-opal', '~> 0.3.0'
gem "jekyll-github-metadata"
gem "jekyll-sitemap", "~> 1.4.0"
gem 'jekyll-theme-cayman', '~> 0.2.0'
gem 'jekyll-coffeescript', '~> 1.1', '>= 1.1.1'
end
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem 'tzinfo', '~> 2.0', '>= 2.0.4'
gem 'tzinfo-data', '~> 1.2021', '>= 1.2021.1'
end
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
在本地启动网站的命令。
$ bundle exec jekyll serve
【问题讨论】:
-
GitHub Pages 可能会注入
site.github.*变量。您能否使用您的 Gemfile 以及用于在本地构建/服务您的网站的命令来编辑问题?
标签: jekyll github-pages jekyll-theme