ul.blogpostGrid
for child in page.get('/posts').children
a(href=child.url): li.col.span_1_of_4
h2 #{child.title}
div.imgThumb(style='background-image: url(#{child.url}thumb.jpg);')
p #{child.excerpt}
For 循环当前按创建的升序显示博客文章。如何反转它们的显示顺序? 有反转功能吗?如果是的话,在这种情况下如何实现? 我正在使用伍兹cms。 https://github.com/studiomoniker/woods
最佳答案
这有帮助。
for child in page.get('/posts').children.reverse()
关于node.js - 如何在 Jade 中反向迭代 for 循环?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32291916/