New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates for chef prepare post and page #148

Merged
merged 3 commits into from Sep 21, 2014

Conversation

Projects
None yet
2 participants
@pauldl
Copy link
Contributor

pauldl commented Jul 19, 2014

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 added some commits Jul 19, 2014

Added twig templates to chef prepare post and prepare page.
You can override the default templates now by creating a prepare/page.html
or prepare/post.html. You can also use any extension defined in auto_formatters,
so prepare/post.md will allow you to create .md posts by default, pre-populated
with customized contents.
@pauldl

This comment has been minimized.

Copy link
Contributor

pauldl commented Jul 23, 2014

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

Updating the pull request to be consistent.

@ludovicchabant

This comment has been minimized.

Copy link
Owner

ludovicchabant commented Jul 24, 2014

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

ludovicchabant added a commit that referenced this pull request Sep 21, 2014

Merge pull request #148 from pauldl/master
Templates for chef prepare post and page

@ludovicchabant ludovicchabant merged commit 274e26a into ludovicchabant:master Sep 21, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment