简体   繁体   English

GitHub项目页面博客的功能失效jekyll主题-> gh-pages

[英]disfunctional jekyll theme for GitHub project page blog --> gh-pages

When I use a dedicated GitHub page to host this blog the theme works, see here . 当我使用专用的GitHub页面托管此博客时,主题有效,请参见此处

However, what I want to do is create this blog as a "Project Page", ie a subpage of an organization, in this way . 不过,我想要做的就是创建这个博客作为“项目页面”,即一个组织的子页面,在这种方式

I've been following the tutorial on how to create a gh-pages branch, provided by GitHub themselves . 我一直在关注GitHub本身提供的有关如何创建gh-pages分支的教程。

In conjunction with the " Host on GitHub in 3 Minutes " tutorial from Jekyll. 结合Jekyll的“ 在3分钟内在GitHub上托管 ”教程。

I can get it up and running with the basic out-of-the-box theme, but I want to use the " twitter theme ", but when I followed the command to install it, ie rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git" and then pushed to the gh-pages branch, it just completely stripped away all the formatting and now there is no theme at all, see here . 我可以使用基本的现成主题启动并运行它,但是我想使用“ twitter主题 ”,但是当我按照命令安装它时,即rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git" ,然后推送到gh-pages分支,它完全剥离了所有格式,现在根本没有主题,请参见此处

Why did that happen? 为什么会这样呢? How can I fix it? 我该如何解决?

As usual it's a baseurl problem. 像往常一样,这是一个baseurl问题。 In _config.yml : set 在_config.yml中:设置

baseurl: /Description-Logicians-of-EIS

or BASE_PATH if you use Jekyll Bootstrap BASE_PATH如果您使用Jekyll Bootstrap)

If you open up the console in your browser ( ctrl + J ), you can see the CSS fails to load with a 404. 如果在浏览器( ctrl + J )中打开控制台,则可以看到CSS无法加载404。

Failed to load resource: the server responded with a status of 404 (Not Found)
http://eis-bonn.github.io/assets/themes/twitter/css/1.4.0/bootstrap.css 

That's probably a good starting point. 那可能是一个很好的起点。 Where are your css files stored? 您的CSS文件存储在哪里?

Spoiler Alert! 剧透警报!

When I visit your repository , the directory pointed to in your header is missing. 当我访问您的存储库时 ,标头中指向的目录丢失了。 Instead I find Bootstrap in an entirely different directory . 相反,我在完全不同的目录中找到Bootstrap。

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

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