-
-
Notifications
You must be signed in to change notification settings - Fork 473
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
V3: JSON-based content rendered as [object Object] #3131
Comments
Unrelated to this issue, which I didn't have the time to look at in detail: |
Hah! I found your bug! I personally don't think this was supposed to work in the old version anyways and because of this wouldn't consider this a bug, but definetly worth documenting. |
* Fix error * Rename content to texts (reserved for 11ty). See 11ty/eleventy#3131 (comment)
Oh, wow 🤯Thank you! I changed |
Sorry, @Snapstromegon, I forgot to answer your first question: I've built other 11ty websites with much more content, where I'm using the standard practice you mentioned :-) |
Yes, at least in layouts content should be reserved for 11ty. |
Good to know.
|
Let's keep it open until we have a follow-up issue for documenting this behavior. I'm going to bed now, so if you want to, you can create that issue or leave it for me to do tomorrow. |
Done. Good night :-) |
Operating system
macOS Sonoma 14.2
Eleventy
3.0.0-alpha.2
Describe the bug
Hi,
I was testing V3 and have just run into a weird bug:
I upgraded and converted a very minimal 11ty project to ESM, and the site seemingly builds as expected in development and production. However, while the JSON-based content is generated, it doesn't render. I get a mysterious
[object Object]
instead of the generated HTML.I think the problem has to do with the template/layout:
{{ content | safe }}
to{{ content | log }}
I can see the content in the terminal{{ content | dump }}
I see it in myindex.html
.The same problem occurs with a markdown file, so it's not just a Nunjucks-JSON issue.
Would appreciate any pointers :-) Thanks!
Reproduction steps
Expected behavior
No response
Reproduction URL
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: