jekyll - 如何在 Jekyll 中将对象添加到站点变量中?
问题描述
我希望在条件语句中将对象作为站点变量传递。
我已经尝试过直接实施......不起作用。
...
# I want to replace:
{% for author in site.research %}
...
# with:
...
{% for author in site.{{include.content}} %}
...
解决方案
{% for author in site[include.content] %}
可以做到这一点。
推荐阅读
- reactjs - 如何在单个 ASP.NET Core 站点上托管多个 React SPA 应用程序?
- sql - 在同一序列上重复 nextval => ORA-01000 超出最大打开游标
- numpy - 在 Python keras 中不正确地连接 LSTM 层
- r - ggplot同步y轴刻度
- node.js - 如何在 JS 中使用另一个文件中的函数
- python - SageMaker 的 FensorFlow 培训作业 - 如何更改脚本存档路径?
- google-sheets - 将函数排列成一列
- certificate - 在 Android <23 中声明证书用途
- python - Python用户的numpy输入
- sql - TSQL Join JSON 对象数组属性