5
如何使用Liquid中的地图过滤器?我在Jekyll中使用它。液体模板地图过滤器
---
my_array: [apple, banana, orage]
my_map:
hello: world
foo: bar
my_string: "how does this work?"
---
{{ page.my_map | map ... }}
这就是我在哪里迷路。我似乎无法在文档或任何其他网上找到任何关于此用法的示例。顺便说一下,我不知道Ruby,但是,source code对我来说也不是很清楚。
从它看起来像下面应该生产的东西的filter tests,但在GitHub上,我得到什么:
{{ site.posts | map: 'title' | array_to_sentence_string }}
我希望,我应该得到的东西,如:
My First Blog Post, Yet Another Post, and Third Posts