-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for post in page.posts
does not work with Swig
#232
Comments
You should use |
None of them works :-( |
Okay. I'll add Warehouse support for Swig in the next version. |
Cool thanks :-) When I iterate on EJS lets you execute real functions, while Swig does not want to. Thanks for answering so fast :-) |
So.. is this fixed? I am getting exactly the same problem. site.posts does not output anything when iterating through it with Swig's for each loop. |
Swig plugin is removed. Use site.posts.toArray() instead. |
I think it's related to the iterable properties of
page.posts
.If I have this
layout.swig
file for example:It will output this:
Any explanation would be warmly welcomed. Twig is absolutely not documented and I'm struggling using it (for example, I discovered I needed to do
{{ body | raw }}
in mylayout.swig
to output the content ofindex.swig
.Thanks!
The text was updated successfully, but these errors were encountered: