Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Jekyll中列出所有帖子类别?_Jekyll_Liquid - Fatal编程技术网

如何在Jekyll中列出所有帖子类别?

如何在Jekyll中列出所有帖子类别?,jekyll,liquid,Jekyll,Liquid,我正在考虑使用以下代码段,但它不会返回任何内容 {% for category in site.categories %} <li><a href="{{ category.url }}"><strong>{{ category.title }}</strong></a></li> {% endfor %} {%用于site.categories%} {%endfor%} 我也在使用Jekyll的原创文

我正在考虑使用以下代码段,但它不会返回任何内容

{% for category in site.categories %}
        <li><a href="{{ category.url }}"><strong>{{ category.title }}</strong></a></li>
{% endfor %}
{%用于site.categories%}
  • {%endfor%}
    我也在使用Jekyll的原创文章,但我不知道如何列出所有正在使用的文章类别(对于博客页面边栏)?

    试试这个:

    {% for category in site.categories %}
        <li><a href="{{category.url}}"><strong>{{category|first}}</strong></a></li>
    {% endfor %}
    
    {%用于site.categories%}
    
  • {%endfor%}
    试试这个:

    {% for category in site.categories %}
        <li><a href="{{category.url}}"><strong>{{category|first}}</strong></a></li>
    {% endfor %}
    
    {%用于site.categories%}
    
  • {%endfor%}
    您使用的具体插件是什么?上面的链接指向generators文档。@marcanuy类别页面该部分下的generator列表!你在使用什么特定的插件?上面的链接指向generators文档。@marcanuy类别页面该部分下的generator列表!