Skip to content
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

Sperate partials out of config and into files #6

Open
scruffydan opened this issue Apr 14, 2014 · 3 comments
Open

Sperate partials out of config and into files #6

scruffydan opened this issue Apr 14, 2014 · 3 comments

Comments

@scruffydan
Copy link

Sorry if this is possible already and I just missed it. I am new to docpad (and static site generators generally).

Currently the readme states that partials can be added to the docpad.coffee file. This works well and partials can be called using the typical handlebars syntax of {{>partialname}}

But it would be super useful if I could define a directory and put all my partials (as separate files, like header.hbs, footer.hbs ...etc) there while retaining the ability to call the partial withe the same {{>partialname}} syntax.

Thanks

EDIT: While I am at it why not have the same thing the same work with helpers

@supermoos
Copy link

Is there a way to do this?

@fantapop
Copy link

Its not a great solution but maybe this can be done programatically when loading docpad.coffee.

@smeijer
Copy link

smeijer commented Dec 21, 2014

I'm currently using a separate plugin for managing Handlebars helpers. That plugin allows me to split helpers into files, so it should be possible.

I'm using this plugin: https://github.com/apelsophiebarat/docpad-plugin-handlebarshelpers
(couldn't use docpad install, so cloned it manually)

In this repo, by the same owner, you can see how it's been used:
https://github.com/apelsophiebarat/gssb-menu-site

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants