根中的博客循环破坏了格式/解析 - jekyll 站点
我制作了一个 jekyll 网站,一切都很好。然后我决定将博客移至域的根目录。现在看来 jekyll 无法正确解析我的帖子。帖子内容中的所有格式均被删除。标题、突出显示和所有内容都只是作为字符串输出。我的布局文件中的 Html 标签完好无损,其他一切都按预期工作。
这是我的 index.html,它呈现博客循环:
---
layout: main
title: my title
---
{% for post in site.posts %}
<article>
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<time datetime="{{ post.date | date: "%Y-%m-%d" }}"><span>{{ post.date | date_to_string }}</span></time>
{{ post.content | postmorefilter: post.url, "Read the rest of this entry" }}
</article>
{% endfor %}
这是我的帖子的布局 (journal.html):
---
layout: main
---
<article>
<h2>{{page.title}}</h2>
{{ page.content }}
</article>
我的帖子使用 layout:journal
我已经删除了生成的站点,停止并启动了 jekyll以及许多其他的事情。
有什么建议吗?
I've made a jekyll site, and all was fine and dandy. Then I decided to move the blog to the root of the domain. Now it looks like jekyll doesn't parse my posts correctly. All formatting is stripped from the post content. Headers, highlighting and everything is just output as a string. Html tags from my layout files are intact, and everything else is working as expected.
This is my index.html which renders the blog loop:
---
layout: main
title: my title
---
{% for post in site.posts %}
<article>
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<time datetime="{{ post.date | date: "%Y-%m-%d" }}"><span>{{ post.date | date_to_string }}</span></time>
{{ post.content | postmorefilter: post.url, "Read the rest of this entry" }}
</article>
{% endfor %}
And this is the layout for my posts (journal.html):
---
layout: main
---
<article>
<h2>{{page.title}}</h2>
{{ page.content }}
</article>
My posts uses layout: journal
I have removed the gererated site, stopped and started jekyll and numerous other things.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,事实证明,一如既往,这都是我自己的错。
我的日记布局错误。我将
{{ page.content }}
更改为{{ content }}
- 瞧!Well, turns out it was my own fault as always.
My journal layout was wrong. I changed
{{ page.content }}
to{{ content }}
- ét voila!