balupton/docpad — Issue #112: document.contentRendered without the wrapped layout
Author: html5anchor
Created: 2011-12-16 00:26:50+00:00
State: open

# Use cases

- A blog with full blog posts listed in an overview while also being available as separate pages.
- Anything where documents in Markdown (or one of the other supported languages) are included by a layout and are desired to be rendered.

# Currently possible

1. Giving a document a layout:
---
layout: post
---
2. Or giving a document no layout and including it:
<%- document.contentRendered %>

# Example

<% for document in @documents: %>
<% if documen.url.indexOf('/posts') >= 0: %>

<%= document.title %>

<%- document.contentRendered %>

<% end %>
<% end %>