0
我有一个category.html
页面,它将循环访问某个类别的帖子。Jekyll中的类别页面
{% for post in site.categories.tech %}
我想要显示当用户点击
{{ post.categories }}
这是从显示的所有职位的回路中产生
从index.html
页。
{% for post in site.posts %}
我需要{{ post.categories }}
变量替换.tech
在categories.html
这样
{% for category in site.categories.{{ post.categories }} %}
我不知道如何将变量从index.html
到categories.html
如何传递从index.html中点击的变量。如果用户点击了tech,我怎么才能将它传递给categories.html并将值放在[post.categories] – juscuizon
里我不明白“clicked变量”是什么意思。请发布一个示例,说明如何在'index.html'中定义该变量。 –
{{post.categories}} – juscuizon