ludovicchabant / PieCrust

A simple PHP website engine and static file generator.
http://bolt80.com/piecrust
Other
239 stars 43 forks source link

Templates for chef prepare post and page #148

Closed pauldl closed 10 years ago

pauldl commented 10 years ago

I use a number of custom properties in the front matter of my posts, and I wanted to have these properties automatically available from chef prepare post.

I'm using the templating engine here so that you can create custom twig templates for your page and post defaults. You can override the stock page and post templates by placing your own templates in _content/prepare/post.html or _content/prepare/page.html.

I also use all the extensions defined in auto_formats, so if you create ex. _content/prepare/post.md then chef prepare post test-post will create path/to/test-post.md.

pauldl commented 10 years ago

I noticed I was using tabs instead of spaces - derp.

Updating the pull request to be consistent.

ludovicchabant commented 10 years ago

Nice! :) It looks good, but I'll have to test it first (sometime in the next couple days). Thanks!