I see the basic configuration guide for docpad with express here: http://docpad.org/docs/api/
What I'd really like to accomplish is for my express site to maintain its directory structure and the docpad app to live in a sub directory so that the directory structure of docpad is not intermingled with express.
The goal is to share layouts and allow express to server highly volatile, dynamic content and docpad to render the less frequently updated static-isn content. mixing the directories: routes, views, src, out, render, public, etc will obscure their purpose and make the app somewhat unwieldy to the uninitiated. Is there an easy way to attach docpad to the express app and tell it to start from a specific path?
- controllers
- docpad
- out
- src
- files
- //layouts <- layouts would instead be pointed to ../views/layouts
- render
- static
- public
- views
If you have an alternate suggestion that is easier, that would be appreciated as well.
I think what you want to do is share layouts between your express app and docpad. You can configure docpad to look for layouts somewhere other than the default location - which in your case would be the
viewsfolder.In the
docpad.coffeefile you can configure the layouts path usinglayoutsPathsconfig option. Something like this:Checkout the documentation on the docpad configuration file:http://docpad.org/docs/config/