本来hexo-NexT的默认分类页面点开后之后时间线和标题,没有摘要部分,如下图。

想把它变成带有摘要视图的,就像首页那样。把~\themes\next\layout下的category.njk的内容替换成了下面的。
{% extends '_layout.njk' %}
{% import '_macro/post-collapse.njk' as post_template with context %}
{% import '_macro/sidebar.njk' as sidebar_template with context %}
{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ title }}{% endblock %}
{% block class %}index posts-expand{% endblock %}
{% block content %}
      <div class="collection-title">
        <h1 class="collection-header">
          <center>{{- page.category }}
          <small>{{ __('title.category') }}</small></center>
        </h1>
      </div>
  {%- for post in page.posts.toArray() %}
    {{ partial('_macro/post.njk', {post: post, is_index: true}) }}
  {%- endfor %}
  {%- include '_partials/pagination.njk' -%}
{% endblock %}
{% block sidebar %}
  {{ sidebar_template.render(false) }}
{% endblock %}现在变成这样了。

想要看时间线可以在archives目录下查看。
