Jekyll site.categories.{{variable}}?

前端 未结 2 753
盖世英雄少女心
盖世英雄少女心 2021-02-13 20:50

I want to make an archive page with the example generator from the Jekyll documentation. The generator works fine but I don\'t know to implement the layout correctly. I am using

相关标签:
2条回答
  • The correct syntax for the loop is

    {% for post in site.categories[cat] %}
    
    0 讨论(0)
  • 2021-02-13 21:08

    I figured it out myself!

    The line
    {% for post in site.categories.cat %} can be written like:
    {% for post in site.categories.[page.category] %}

    It didn't know about the use of these brackets!

    0 讨论(0)
提交回复
热议问题