gloriajs / gloria

Gloria is a static website generator, based on NodeJS.
https://gloria.js.org
Other
152 stars 11 forks source link

Create pages programatically #120

Open dvidsilva opened 7 years ago

dvidsilva commented 7 years ago

It would be useful to create pages from a json file, or some data element.

I imagine something like this.

---
metadata: yaml
    prefix: /pictures/
    suffix: ''
    type: template
    source: data.images
    source_type: json
---
<template source={data.images}>
    <h1>{name}</h1>
     <img src="{url}" />
</template>

And that creates a bunch of pages in the build folder, using that template.