Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

change `docpad render` to `docpad compile`, introduce new `docpad render` that is context aware #271

Closed
balupton opened this Issue · 4 comments

2 participants

@balupton
Owner

Users commonly attempt to use docpad render for rendering files that require context (e.g. layouts or databases) - however, docpad render as is, is only aware of the file that is passed in and nothing else.

The suggestion is that we change the current docpad render to docpad compile, and create a new docpad render that parses the source files, but only renders the passed file.


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@balupton
Owner

Refs #269

@Delapouite

+1 I've been bitten by this misconception in the past a few times as well.
What will happen to events name like renderAfter, renderBefore etc...? Will they become compileAfter, compileBefore?

@balupton
Owner

They will stay exactly the same. The only difference is that we will need to split generate into three sub actions: parse, render, write. So:

  • compile = renderFile
  • render = parse, renderFile
  • generate = parse, render, write

It's more or less straightforward to do, just need to find the time. For now, the highest priority is the DocPad website.

Will add this to the todo.

@balupton
Owner

Not really any benefit of this.

@balupton balupton closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.