Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Create many pages from data.yaml file

Started by Muut Archive 10 years ago · 2 replies · 417 views
10 years ago

So I have data.yaml file with multi-level list of tools:

YAML
toolA
   - image:
   - tooldescription:
   - toolprice
   - toollongdescription
   - toolsimilar
       - similar1
       - similar2
toolB
   - image:
   - tooldescription:
   - toolprice
   - toollongdescription
   - toolsimilar
       - similar1
       - similar2  

Of course, the list is more complex and there are more positions in it, this is just a simplified example.
How can I create automatically a page for each toolX? A page that will be automatically updated if I introduce changes to my data.yaml file.

10 years ago

There is no automated tool to do that out of the box. A page must have its own folder in the filesystem and markdown file.

10 years ago

Maybe that is something you could do with a python script

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2289 9 years ago
Archive · by Muut Archive, 9 years ago
2 1501 9 years ago
Archive · by Muut Archive, 9 years ago
2 4754 9 years ago
Archive · by Muut Archive, 9 years ago
1 3570 9 years ago
Archive · by Muut Archive, 9 years ago
3 1627 9 years ago