iissnan / hexo-theme-next

Elegant theme for Hexo.
http://notes.iissnan.com
MIT License
15.88k stars 3.62k forks source link

分类无法正常使用 #2209

Open xiaoli1368 opened 5 years ago

xiaoli1368 commented 5 years ago

按照相关教程实现文档添加标签和分类功能后,标签的相关功能可以正常实现,但是分类功能出现错误,具体表现为:

因此分析得出categories页面的配置文件有问题,但是又不知道问题出在那里,,经过查看所使用next主题的categories配置文件为category.swig,如下所示:

{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template %}
{% import '_macro/sidebar.swig' as sidebar_template %}

{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ config.title }}{% endblock %}

{% block content %}

  {######################}
  {### CATEGORY BLOCK ###}
  {######################}
  <div class="post-block category">

    <div id="posts" class="posts-collapse">
      <div class="collection-title">
        <{% if theme.seo %}h2{% else %}h1{% endif %}>{#
        #}{{ page.category }}{#
        #}<small>{{  __('title.category')  }}</small>
        </{% if theme.seo %}h2{% else %}h1{% endif %}>
      </div>

      {% for post in page.posts %}
        {{ post_template.render(post) }}
      {% endfor %}
    </div>

  </div>
  {##########################}
  {### END CATEGORY BLOCK ###}
  {##########################}

  {% include '_partials/pagination.swig' %}

{% endblock %}

{% block sidebar %}
  {{ sidebar_template.render(false) }}
{% endblock %}

请高手帮忙解决一下,不胜感激?

cogito0823 commented 5 years ago

需要新建一个 categories 页面。 具体如下:

stevenjoezhang commented 5 years ago

此问题已在新版中解决,本仓库不再维护。请查看:https://github.com/next-theme/hexo-theme-next

xiaoli1368 commented 5 years ago

好的,多谢您的帮助,感激不尽。

------------------ 原始邮件 ------------------ 发件人: "ᴍɪᴍɪ"notifications@github.com; 发送时间: 2019年8月1日(星期四) 晚上9:39 收件人: "iissnan/hexo-theme-next"hexo-theme-next@noreply.github.com; 抄送: "削梨"1004285399@qq.com;"Author"author@noreply.github.com; 主题: Re: [iissnan/hexo-theme-next] 分类无法正常使用 (#2209)

此问题已在新版中解决,本仓库不再维护。请查看:https://github.com/theme-next/hexo-theme-next

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.