【发布时间】:2016-02-17 04:22:27
【问题描述】:
我想创建一个作者_layout,我可以用它来挂载一个由 Jekyll 提供支持的站点的所有作者的列表(实际上是一个播客的主机列表)。我希望这是在
+ \
+ _posts
+ _includes
+ _layouts
+ _config.yml
+ authors <-- Here
在我的 Jekyll 站点中,我已经看到 Jekyll 在那里呈现 markdown 文件。
但是,我不能把作者带到那里并用它来建立一个列表。
我正在使用此代码
<ul>
{% for post in site.categories.authors %}
<li><a href="{{ site.url }}{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
关于我应该如何做我想做的任何建议?我希望生成页面以返回列表中主机的名称,并为每个主机提供链接,例如
<a href="/authors/foo">This guy</a>
<a href="/authors/bar">That guy</a>
<a href="/authors/baz">That other guy</a>
要渲染的文件位于:
+ \
+ _posts
+ _includes
+ _layouts
+ _config.yml
+ authors
+ foo.md
+ bar.md
+ baz.md
【问题讨论】: