简体   繁体   English

Jekyll架构主题不在GitHub页面上工作

[英]Jekyll architect theme not working on GitHub page

I created a GitHub page with a repository called myusername.github.io I cloned that (empty) repo to my PC and using jekyll command line I created a new blog inside of this folder. 我创建了一个名为myusername.github.io的存储库的GitHub页面。我将这个(空)repo克隆到我的PC并使用jekyll命令行我在这个文件夹中创建了一个新的博客。 It was building correctly on my PC and on GitHub with the standard theme 'minima'. 它在我的PC和GitHub上正确构建,标准主题为“minima”。 However, I wanted to use the 'architect' theme and followed their instructions (just add theme: jekyll-theme-architect on the _config.yml) to use it but got a messed up page as a result. 但是,我想使用'架构'主题并按照他们的说明(只需在_config.yml上添加theme: jekyll-theme-architect )来使用它,但结果却弄乱了。 What is going on? 到底是怎么回事? How can I fix that? 我该如何解决这个问题?

I am totally pissed off by this. 我完全被这个生气了。 The instruction is so simple, but does not work!!! 指令很简单,但不起作用!

This is due to not having the proper gem locally, so you can install the gem explicitely or add the github-pages gem that contains that theme as it is supported by Github pages. 这是由于本地没有正确的gem,因此您可以明确地安装gem或添加包含该主题的github-pages gem,因为Github页面支持它。

Add the following to your site's Gemfile : 将以下内容添加到您网站的Gemfile

gem "github-pages", group: :jekyll_plugins

then run bundle install . 然后运行bundle install

Edit index.md and change the layout to the default one: layout: default . 编辑index.md并将布局更改为默认layout: default

Remove the lines that contains an include tag in about.md for example: {% include icon-github.html username="jekyll" %} . 删除about.md中包含include标记的about.md ,例如: {% include icon-github.html username="jekyll" %}

and you will be able to use the new theme. 并且您将能够使用新主题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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