【发布时间】:2015-08-05 03:49:27
【问题描述】:
我正在构建我的 jekyll 页面,我刚刚上传到 gh-pages。当我点击我的帖子链接时,我收到一个 404 错误,这是我的设置。
_config.yml
baseurl: ""
url: "bousis.github.io/blog"
permalink: /blog/:title
这是索引中的代码
<ul class="posts">
{% for post in site.posts %}
<li>
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
<span class="right date">{{ post.date | date_to_string }}</span>
</li>
{% endfor %}
</ul>
我有我的baseurl: "",因为这是让我的 css 加载的唯一方法。从头部删除前导/。
<link rel="stylesheet" href="{{ "css/main.css" | prepend: site.baseurl }}">
这是我的文件夹树 [文件夹树]1
我想要实现的是能够在我的网址中有这样的东西
bousis.github.io/blog/welcome-to-jekyll to link to my post
如果能得到就完美了
bousis.github.io/
作为索引
bousis.github.io/welcome-to-jekyll 我的帖子
谢谢,
【问题讨论】:
标签: url jekyll github-pages