jekyll可以使用GET参数吗?

sch*_*mmd 3 jekyll

我想制作一个分类页面.

{% for post in site.categories[CATEGORY_NAME] %}
  <li><a href="{{ post.url }}">{{ post.title }}</a> ({{post.date|date:"%-d %B %Y"}})</li>
{% endfor %}
Run Code Online (Sandbox Code Playgroud)

是否可以使用页面参数填写CATEGORY_NAME?然后我可以有一个文件category.html可以作为多个类别的索引页面(即category.html?name=foodcategory.html?name=animals.

我找到了一些处理这个问题的插件,但是要求插件似乎有些过分.

  1. https://github.com/zroger/jekyll-categories
  2. http://blog.nitrous.io/2013/08/30/using-jekyll-plugins-on-github-pages.html

这是我能找到的最相关的论坛帖子.

https://groups.google.com/forum/#!topic/jekyll-rb/y-dq-63Uvy4

如果没有插件就无法做到这一点,有充分的理由吗?

sch*_*mmd 5

我认为正确的答案是Jekyll页面必须在提供之前编译为html.如果液体语言采用参数,则这是不可能的.