-
-
Notifications
You must be signed in to change notification settings - Fork 86
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Creating pages from data files (json, yaml, etc) - possible? #38
Comments
Yes, you have to create a page in javascript or typescript exporting a generator. You have an example with pagination here: https://lumeland.github.io/creating-pages/pagination/ Basically, every value returned by a generator will be converted to a page. The 11ty example would be something like this: // possum-pages.tmpl.js
export default function *({possums}) {
for (const possum of possums) {
yield {
permalink: `possums/${possum.name}/`,
content: `${possum.name} is ${possum.age} years old`
}
}
} |
Excellent! Now I see that in the docs 🤦 Thanks for clarifying! |
@oscarotero Maybe convert this issue to a discussion in section "Q&A"? |
@shadowtime2000 That's a good idea. Can we move/convert this issue to a discussion? Or we need to create a new discusion from scratch? |
@oscarotero I think you will be able to convert this issue to a discussion, just click "Convert to discussion" where it says pin issue and transfer issue. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Greetings,
Does Lume support creating pages from data files, a la https://www.11ty.dev/docs/pages-from-data/?
The text was updated successfully, but these errors were encountered: