pagination - Why Are Deleted Posts Showing Up in Paginated Posts in Jekyll Blog?
问题描述
I have a Jekyll blog. I deleted many of the blog posts because they were very old. However, they are still showing up in my categories (paginator.posts). Here's the code:
<div class="post-list">
{% for post in paginator.posts %}
<article class="clearfix post type-post status-publish format-standard has-post-thumbnail">
<a href="{{ post.url }}" title="{{ post.title }}">
<h2 class="h2">{{ post.title | remove: "| SiteName" }}</h2>
</a>
<p class="meta">
{% assign d = post.date | date: "%-d" %}
{{ post.date | date: "%B" }}
{{ d }},
{{ post.date | date: "%Y" }}
{% if site.data.authors[post.author.login] %}
{% assign author = site.data.authors[post.author.login] %}
by <a href="{{ author.link }}" title="Posts by {{ author.name }}" rel="author">{{ author.name }}</a><br>
{% endif %}
</p>
<p>
{% if post.meta.thumbnail_asset and post.meta.thumbnail_alt %}
<a href="{{ post.url }}" title="{{ post.meta.thumbnail_alt }}">
{% asset '{{ post.meta.thumbnail_asset }}' alt='{{ post.meta.thumbnail_alt }}' class="wp-blog-thumbnail img-lt" %}
</a>
{% elsif post.meta.thumbnail_asset %}
<a href="{{ post.url }}" title="{{ post.title }}">
{% asset '{{ post.meta.thumbnail_asset }}' alt='{{ post.title | strip_html | truncatewords: 5 }}' class="wp-blog-thumbnail img-lt" %}
</a>
{% elsif post.meta.thumbnail_url and post.meta.thumbnail_alt %}
<a href="{{ post.url }}" title="{{ post.meta.thumbnail_alt }}">
<img src="{{ post.meta.thumbnail_url }}" class="wp-blog-thumbnail img-lt" alt="{{ post.meta.thumbnail_alt }}">
</a>
{% elsif post.meta.thumbnail_url %}
<a href="{{ post.url }}" title="{{ post.title }}">
<img src="{{ post.meta.thumbnail_url }}" class="wp-blog-thumbnail img-lt" alt="{{ post.title | strip_html | truncatewords: 5 }}">
</a>
{% endif %}
{% if post.description %}
{{ post.description }}..
{{ post.content | markdownify | strip_html | truncatewords: 55 }}
{% endif %}<a href="{{ post.url }}" title="{{ post.title }}">Read More »</a>
</p>
</article>
{% endfor %}
</div> <!-- end post-list -->
Any ideas? Thanks in advance.
解决方案
推荐阅读
- python - AttributeError:“布尔”对象没有属性“_formatMessage”
- node.js - 在 NestJs 上为单个控制器设置请求正文大小限制
- google-cloud-storage - gsutil:为什么 ls 返回目录本身
- reactjs - Material UI - 扩展面板必须向上扩展,位于页脚中,这样用户就不需要向下滚动
- c - 在 C 中将数据分成块的有效方法是什么?
- python - mysql-connector-c 升级后安装 MySQL-python 包时出错
- javascript - 如何将此 Formik 代码转换为 Typescript 无错误代码
- ios - Swift 中的集合视图单元格格式不正确
- ruby-on-rails - Rails 可排序的 ActiveSupport::MessageVerifier::InvalidSignature 错误
- java - Maven 生命周期和插件