[英]Recent posts not showing up on Jekyll Pixyll theme
我正在一个个人网页上工作,并且将最新的Pixyll版本添加到了我的仓库中。 我对_posts/2014-06-08-pixyll-has-pagination.md
进行了更改,并在标头中包含以下属性
published: true
permalink: /test/
当我将网址定向到webpage/test/
,我可以看到该博客文章,但是在我的主页中却看不到它是最新文章的一部分。 我的index.html
如下:
---
layout: default
---
{% assign posts_count = (paginator.posts | size) %}
<div class="home">
{% if posts_count > 0 %}
<div class="posts">
{% for post in paginator.posts %}
<div class="post py3">
<p class="post-meta">{{ post.date | date: site.date_format }}</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="post-link"><h3 class="h1 post-title">{{ post.title }}</h3></a>
<p class="post-summary">
{% if post.summary %}
{{ post.summary }}
{% else %}
{{ post.excerpt }}
{% endif %}
</p>
</div>
{% endfor %}
</div>
{% include pagination.html %}
{% else %}
<h1 class='center'>{{ site.text.index.coming_soon }}</h3>
{% endif %}
</div>
分页是这样工作的。
您有五个帖子:
_posts
├── 2015-07-11-announcing-pixyll-version-2.md
├── 2014-06-11-welcome-to-pixyll.markdown
├── 2014-06-10-see-pixyll-in-action.md
├── 2014-06-09-so-what-is-jekyll.md
└── 2014-06-08-pixyll-has-pagination.md
您的site.pagination
设置为4
。
您的博客索引将显示前4个帖子 , 第2页将显示第5个帖子 ( 2014-06-08-pixyll-has-pagination.md
)
这里没有问题。
注意:在您的_config.yml中
=======
github_username:lordlabakdas
到github_username: lordlabakdas
冒号后的空间 twitter_username:siddugan
更改为twitter_username: siddugan
冒号后的twitter_username: siddugan
空间
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.