Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Create many pages from data.yaml file

Started by Muut Archive 10 years ago · 2 replies · 355 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 1356 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago