I'm writing a site in Jekyll, which uses Liquid.
I have front matter for pages that I'd like to look like this:
---
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
---
In Liquid, the links section of YAML comes through as:
[{'demo' => 'http://www.github.com/copperegg/mongo-scaling-demo' }]
I'd like to be able to iterate over the array, doing something like this:
<a href="{{ link.value }}">{{ link.key }}</a>
But any ideas I've had so far have failed me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…