【发布时间】:2012-01-02 15:50:40
【问题描述】:
我正在 Jekyll 中编写一个使用 Liquid 的网站。
我希望页面看起来像这样:
---
title: Designing algorithms that scale horizontally
speaker: Luke Ehresman, CopperEgg
category: notes.mongodallas.talks
links:
- demo: http://www.github.com/copperegg/mongo-scaling-demo
layout: talknotes
---
在 Liquid 中,YAML 的链接部分如下:
[{'demo' => 'http://www.github.com/copperegg/mongo-scaling-demo' }]
我希望能够遍历数组,执行如下操作:
<a href="{{ link.value }}">{{ link.key }}</a>
但是到目前为止我的任何想法都失败了。
【问题讨论】: