PhileCMS / Phile

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

[FEATURE] YAML Frontmatter Plugin for Meta data and for making it easier for users other systems to migrate to PhileCMS? #42

Closed bzerangue closed 10 years ago

bzerangue commented 10 years ago

I don't mean to cause trouble, but would love to see a YAML Frontmatter option for meta. I know this was discussed in an earlier issue, and it was decided that YAML Frontmatter for meta doesn't add a specific benefit to Phile.

But, if there was a plugin that allowed for YAML frontmatter, I think this would be great gateway... of getting some of those Jekyll, Middleman, Nanoc, or Statamic folks to consider PhileCMS. They would haven't have to change their content files since those systems use YAML Frontmatter. It would make migration for those coming to Phile much easier.

It's just a thought, but I think it would be a gateway for those non-developer types to jump in and start using Phile with minimal effort and not having to change their content files to HTML or CSS style comments for meta... but they could use their existing YAML frontmatter as meta.

Unfortunately, my PHP skills are horrific or I would try to tackle this myself.

Thanks for your time and for pulling together this superfast and brilliant CMS.

NeoBlack commented 10 years ago

Hi @bzerangue sorry for the late response, I haven't seen this issue before. Would you use the YAML for configuration stuff or for the meta section on each page? Can you provide some example code or projects where YAML is used for meta configuration?

bzerangue commented 10 years ago

@NeoBlack, no worries. I would use the YAML for the Meta Section YAML Front Matter and for separate YAML Data Files (if possible). This would make it quite easy to migrate from a Jekyll site or possibly a Statamic site.

With YAML Front Matter (YAML Meta Data)... this is would be acceptable for meta data...

---
title: Skyfall
published: true
layout: post
tags:
- skyfall
- james bond
- 007
- daniel craig
podcast:
  file: http://domain.com/podcasts/skyfall.mp3
  length: 0:46:01
  filesize: 36370560
---

Also, in regard to YAML Data Files, I envision it how Jekyll has it setup... for instance if you have a staff list.

NeoBlack commented 10 years ago

@bzerangue sorry again for the late response, I was very busy the last months.

I think we could change the meta parser to service, this way it is be possible to replace the meta parser by a plugin.

I will talk to @james2doyle about this issue, but I think a service is a good solution and make phile more flexible.

james2doyle commented 10 years ago

I'm down for the meta-parser as a service. Makes sense. Maybe there are other ways to do meta. Like a same-filename json or something

NeoBlack commented 10 years ago

ok, I will open an issue for the global changes in the architecture. I will take a look at it tomorrow. Maybe the change is easy, then I would implement it shortly, so we could add this change to 0.9.3 and release this version next week. The codings for a YAML Front Matter Config plugin can be done after the release of 0.9.3

james2doyle commented 10 years ago

"Someone" will have to make a phileYAMLMeta plugin now after #76 and #77. So I will close this.