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] sourcing md files #61

Closed Porrenely closed 10 years ago

Porrenely commented 10 years ago

My site has a lot of text blocks that are used over and over again on several pages. Is there a way to include markdown from a file? That file would be a page itself unless its name starts with a dot. Avoiding loops could be left to the user.

james2doyle commented 10 years ago

I actually wrote a pico plugin that would grab a markdown file based on its name.

I can do one for Phile as well

On Saturday, March 15, 2014, Porrenely notifications@github.com wrote:

My site has a lot of text blocks that are used over and over again on several pages. Is there a way to include markdown from a file? That file would be a page itself unless its name starts with a dot. Avoiding loops could be left to the user.

Reply to this email directly or view it on GitHubhttps://github.com/PhileCMS/Phile/issues/61 .

James Doyle

t: @james2doyle https://twitter.com/james2doylew: ohdoylerules.com http://ohdoylerules.com

Porrenely commented 10 years ago

Sounds great! I checked but couldn't find such a plugin. Looking forward to it.

james2doyle commented 10 years ago

Ok here we go.

https://github.com/PhileCMS/phileRender

I think this is an awesome new plugin. Check it out.

If it solves your problem, please close this issue.

kursusHC commented 10 years ago

This is an excellent addition, this kind of simple but highly powerful features are totally reflecting Phile's philosophy (and potential). Thanks a lot for this.

I think there's a typo in the docs concerning the "sub/special" example which turns into "sub/special-nested".

james2doyle commented 10 years ago

Yeah I am proud of this one for sure.

It's small, clever, and solves a big problem without being complicated.

Af first I was thinking, "this is just smart usage of TWIG". But without the great \Phile\Repository\Page class, this would be a huge hassle to create. Also this plugin works with any parser, since it serves the rendered HTML.

I fixed the typo in the readme

NeoBlack commented 10 years ago

great job @james2doyle

james2doyle commented 10 years ago

@Porrenely bump