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