table 中的 Jekyll 议程
Jekyll agenda thing in a table
我正在开发一个需要议程的 Jekyll 网站。我想在我的 _config.yml
文件中的议程中添加要点,使其在文件中看起来像这样。
agenda:
date: 26 January
thing: Birthday
date: 30 March
thing: Another birthday
另一种选择是:
agenda:
item: <td> Date </td> <td> Thing </td>
item: <td> Date </td> <td> Thing </td>
如您所见,输出必须是一个列表。无论我尝试什么,它都不起作用。这是我尝试过的最后一件事。
<table>
<tbody>
{% for point in site.agenda %}
<tr>
{{ point }}
</tr>
{% endfor %}
</tbody>
</table>
希望你能帮我解决这个问题!
我现在不能尝试这个,但是怎么样:
agenda:
- date: January 26
event: Birthday
- date: May 30
event: Another birthday
Note: (make sure that the - is indented by at least one space and that indents match)
然后:
<table>
<tbody>
{% for point in site.agenda %}<tr>
<td>{{ point.date }}</td><td>{{ point.event }}</td>
</tr>{% endfor %}
</tbody>
</table>
或者类似的东西。在一页中,我有一个替代语法:
agenda:
- { date: January 26, event: Birthday }
etc...
这就像一种款待。
我正在开发一个需要议程的 Jekyll 网站。我想在我的 _config.yml
文件中的议程中添加要点,使其在文件中看起来像这样。
agenda:
date: 26 January
thing: Birthday
date: 30 March
thing: Another birthday
另一种选择是:
agenda:
item: <td> Date </td> <td> Thing </td>
item: <td> Date </td> <td> Thing </td>
如您所见,输出必须是一个列表。无论我尝试什么,它都不起作用。这是我尝试过的最后一件事。
<table>
<tbody>
{% for point in site.agenda %}
<tr>
{{ point }}
</tr>
{% endfor %}
</tbody>
</table>
希望你能帮我解决这个问题!
我现在不能尝试这个,但是怎么样:
agenda:
- date: January 26
event: Birthday
- date: May 30
event: Another birthday
Note: (make sure that the - is indented by at least one space and that indents match)
然后:
<table>
<tbody>
{% for point in site.agenda %}<tr>
<td>{{ point.date }}</td><td>{{ point.event }}</td>
</tr>{% endfor %}
</tbody>
</table>
或者类似的东西。在一页中,我有一个替代语法:
agenda:
- { date: January 26, event: Birthday }
etc...
这就像一种款待。