avillafiorita / jekyll-datapage_gen

Generate one page per yaml record in Jekyll sites.
372 stars 80 forks source link

RFE: using datapage_gen fields at Front Matter #54

Closed olea closed 4 years ago

olea commented 6 years ago

For example, you have a table with two fields for the planes.csv data file:

model, name
b787, "Boeing B787 Dreamliner"
a320, "Airbus 320"

Actual situation:

Now you can index the data according the model field, thus generating simple meaningful filenames. But in the model field is automatically used as the final html title, which can be, as in this case, very human friendly.

Proposal:

At the layout's front matter, being able to use datagen_gen fields as properties. For example:

---
layout: planes
title: {{ planes.name }}
---

I thik can be really useful and easy to use.

Thanks in advance.

avillafiorita commented 4 years ago

there is now a title key which can be used to generate the page title. See pull request #74 thanks