我已经安装了jekyll以及在本地创建了一个帖子。我把我的提交推到了主分支&创建了一个没有提交的孤儿分支gh-pages。
在我的float: 32.4246
integral: 144532
中,基本网址代码是这样的,
_config.yml
博客是我的回购。
我将baseurl: "https://githubusername.github.io/blog"
添加到default.html。
如果我加载此链接,https://githubusername.github.io/blog该网站无法正常呈现。See Image
可能是我的问题/错误?提前谢谢。
答案 0 :(得分:4)
Set your baseurl
to just: /blog
.
url
(something.github.io
), before the page-path, read this for further clarification. Why is your HTML code for stylesheets linking to a .scss
file? That's SCSS/SASS, which needs to be processed by Jekyll's SASS converter (or your own converter, into a nice CSS file). HTML only accepts CSS stylesheets.
-
) then 2 newlines, followed by another 3 dashes.Change your stylesheet link in default.html
to this:
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
.css
instead of .scss
, and also the additional site.baseurl
Alternatively, should you decide not to deal with all the site.baseurl
stuff, you can just have site.baseurl
remain a value of "https://githubusername.github.io/blog"
and then just modify the style sheet link to href= blog/css/main.css
(after converting the .scss
file) but this defeats the purpose of a baseurl. Also, if you decide you don't want it to be in blog
in the future you'll have to make a ton of link edits.