jekyll-datapage_gen icon indicating copy to clipboard operation
jekyll-datapage_gen copied to clipboard

Would it be possible to support nested collections?

Open Kralizek opened this issue 2 years ago • 3 comments

I have a case like the following one:

customers:
  - name: Amazing Customer
    foo: bar
    projects:
       - name: P1
         bar: foo
       - name: P2
         bar: fizz
  - name: Brilliant Customer
    foo: bas
    projects:
      - name: P3
        bar: fritz
      - name: P4
        bar: fuzz

I would like to generate a page for each customer and a page for each project.

It would be even better if, when rendering a project, I could access the customer it belongs to. Something like page.parent.foo

Kralizek avatar Jul 13 '22 16:07 Kralizek

I second this. It would be great to have nested directory support. In my usecase, I have a countries dataset and a regions dataset. It would be great to create URLs like /canada/ontario or /italy/tuscany/ instead of canada_ontario or italy_tuscany. Especially when also adding a third level, having multiple folders instead of /canada_ontario_toronto/ or /italy_tuscany_pisa/.

daysleeperrr avatar Jul 15 '22 06:07 daysleeperrr

Sorry for the late reply. I'll look into that

avillafiorita avatar Aug 17 '22 12:08 avillafiorita

+1

In my case i'd love to be able to generate car make pages (e.g. citroen) and all the multiple model pages (e.g. C3). Of course this would also need the ability to use different templates for each of those objects.

musicaldoctor avatar Nov 19 '22 00:11 musicaldoctor