Closed Maluscat closed 7 months ago
Name | Link |
---|---|
Latest commit | 0c23049e4eb5c4fb0f19e67c1e92a3a654643247 |
Latest deploy log | https://app.netlify.com/sites/lumeland/deploys/6570bfcf991cec000700fb15 |
Deploy Preview | https://deploy-preview-91--lumeland.netlify.app/docs/core/loaders |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Hi! Thanks for this, but there are some aspects in your change that are not fully correct.
You have a fully explanation of how de Data
object works here: https://lume.land/docs/advanced/the-data-model/
The loader is just a function to load the content and return the Data
object, but is not responsible of the rendering. Your example of the toml
loader returning HTML code <h1>${tomlData.foo}</h1>
is not correct. It must return only the tomlData
object.
Oh I see, I will remove that part. But then how would I go about taking the data assigned in loadPages()
and rendering something from it? Using a processor?
The pages are rendered with the Engines: https://lume.land/docs/core/loaders/#template-engines
You can load a page from toml, json, yaml, markdown, etc, and render it with nunjucks, vento, js, jsx, etc.
I see, thanks! I have updated it, I hope everything is correct now :)
Great. Thank you!
Hi!
When building a page loader, I noticed that there is no reference as to what needs to be returned from the
loadPages()
callback, so i tried to improve it a bit :) I think the page can be understood better now. I hope I didn't confuse any data types, so please let me know if I did!