我正在完成我的网站重新设计,只需要完成我的投资组合页面。我想使用子目录/子页面,而不是使用文章作为投资组合条目:
...
work
project
index.html
project-2
index.html
index.html
...
Run Code Online (Sandbox Code Playgroud)
我想遍历列表中的这些子页面以显示在work/index.html. 类似于:
<ul>
{% for page in site.work.pages %}
<li>
<figure>
<img src="/img/foo.jpg" alt="foo">
</figure>
</li>
{% endfor %}
</ul>
Run Code Online (Sandbox Code Playgroud)
如何才能做到这一点?