简体   繁体   English

GitHub Pages + Jekyll + Bootstrap + CDN问题

[英]GitHub Pages + Jekyll + Bootstrap + CDN question

I'm new to GitHub Pages and Jekyll, and moving my blog https://sypalo.com to it.我是 GitHub Pages 和 Jekyll 的新手,并将我的博客https://sypalo.com移至其中。

I decided to use CDN for Twitter Bootstrap, so just copied example links from official website to the default.html template which is in the https://github.com/SergeySypalo/sergeysypalo/blob/master/_site/_layouts/default.html我决定将 CDN 用于 Twitter Bootstrap,所以只需将示例链接从官方网站复制到 default.html 模板,该模板位于https://github.com/SergeySypalo/sergeysypalo/blob/master/_site/_layouts/default.html

But when my site is generated, Jekyll creates a local copy of css on the fly, so instead of pointing to the CDN, it creates a link to /assets/styles.css file, but styles are not applied.但是当我的网站生成时,Jekyll 会即时创建 css 的本地副本,因此它不会指向 CDN,而是创建指向 /assets/styles.css 文件的链接,但 styles 未应用。

Also, at the default.html page bottom, instead of 3 JavaScript files on CDN I got only one unknown to me pointing to CloudFlare.此外,在 default.html 页面底部,CDN 上没有 3 个 JavaScript 文件,我只有一个指向 CloudFlare 的未知文件。

What I have to do to bypass Jekyll processing links to the files located on CDN?我必须做什么才能绕过 Jekyll 处理指向位于 CDN 上的文件的链接?

问题出在文件夹结构中,查看我的GitHub仓库并随意为自己分叉和调整。

The problem was in the folder structure.问题出在文件夹结构中。 I put my whole website in the _site subfolder (you may notice that from the path I provided in the question).我将整个网站放在 _site 子文件夹中(您可能会从我在问题中提供的路径中注意到这一点)。 The website generated correctly after I moved all of its content to the root folder.在我将所有内容移动到根文件夹后,该网站正确生成。

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

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