PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
256 stars 48 forks source link

use YAML parser for meta-data evaluation #259

Closed Schlaefer closed 9 years ago

Schlaefer commented 9 years ago

The build in meta-data evaluation is going to use a YAML parser. "Normal" meta-data (title, date) should be used and work as before. My main intention is to add support for nested page properties. Allowing structured data could provide great new opportunities. E.g. it can be utilized (by plugins) to provide or alter a configuration on per page basis. For example:


---
title: Overview
…

pagination:
    items per page: 10
    sort:
        by: date
        order: desc    
---    

A difference between YAML and Phile is that Phile sanitizes the meta-data keys (lowercase, whitespace to underscore, …). We should keep it that way to provide backwards-compatibility (for now).