PhileCMS / Phile

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

yaml parsing in file ... not working for me #279

Closed maybegeek closed 8 years ago

maybegeek commented 8 years ago

Hi there,

I'm using the downloaded version 1.6, everything works except the yaml header parsing.

file looks something like this:


---
Title: value1
Description: value2
Template: value3
Nochwas: value4
Dinge: value5
Apfel: value6
Birne: value7

---

here comes the content. here comes the content. 

in config.php I have:

$config['plugins']['phile\\parserMeta'] = ['active' => true];
$config['plugins']['phile\\parserMeta'] = ['format' => 'YAML'];
$config['plugins']['phile\\phpFastCache'] = ['active' => 'false'];
$config['plugins']['phile\\simpleFileDataPersistence'] = ['active' => 'false'];

but also tested with:

$config['plugins']['phile\\parserMeta']['active'] = true;
$config['plugins']['phile\\parserMeta']['format'] = 'YAML';
$config['plugins']['phile\\phpFastCache']['active'] = false;
$config['plugins']['phile\\simpleFileDataPersistence']['active'] = false;

the default theme does not pick up on meta.description nor meta.title, instead showing the yaml meta info in {{ content }} ... as string. Plus strange behavior of last written yaml meta pair, which gets its own <h2> tag.

perhaps a pointer to the right documentation for yaml in production would help,

thanks alot!

JazzMaster commented 8 years ago

leave format at 'Phile'. It works fine.

Schlaefer commented 8 years ago

Up until now including the 1.6 release the metadata parser only detects <!-- … --> and /* … */ fences for meta tags. The development branch added supported for custom/configurable fences (and with that --- … ---) in #277.

So you have to download the unreleased development version if you want to use --- … --- right now.

Frodox commented 8 years ago

And this feature will be released when #284 will be merged.

Schlaefer commented 8 years ago

Is going to work in 1.7.0