Added documentHTMLWithFrontMatter template variable

This commit is contained in:
benweet 2014-07-22 12:42:50 +01:00
parent 134fddc4aa
commit f54a37481b
3 changed files with 7 additions and 3 deletions

View File

@ -59,6 +59,7 @@ define([
documentMarkdown: selectedFileDesc.content,
strippedDocumentMarkdown: selectedFileDesc.content.substring(selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter.length : 0),
documentHTML: htmlWithoutComments,
documentHTMLWithFrontMatter: (selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter : '') + htmlWithoutComments,
documentHTMLWithComments: htmlWithComments,
frontMatter: selectedFileDesc.frontMatter,
publishAttributes: undefined,

View File

@ -10,10 +10,12 @@ Available variables:
<li>
<b>documentHTML</b>: document in HTML format</li>
<li>
<b>frontMatter</b>: YAML front matter object (undefined if not present)</li>
<b>documentHTMLWithFrontMatter</b></li>
<li>
<b>publishAttributes</b>: attributes of the publish location (undefined if
not publishing)</li>
<b>frontMatter</b>: undefined if no front matter</li>
<li>
<b>publishAttributes</b>: undefined if
not publishing</li>
</ul>
<b>Examples:</b>
<br />&lt;title&gt;&lt;%= documentTitle %&gt;&lt;&#x2F;title&gt;

View File

@ -79,6 +79,7 @@ define([
documentMarkdown: fileDesc.content,
strippedDocumentMarkdown: fileDesc.content.substring(fileDesc.frontMatter ? fileDesc.frontMatter._frontMatter.length : 0),
documentHTML: html.withoutComments,
documentHTMLWithFrontMatter: (fileDesc.frontMatter ? fileDesc.frontMatter._frontMatter : '') + html.withoutComments,
documentHTMLWithComments: html.withComments,
frontMatter: fileDesc.frontMatter,
publishAttributes: publishAttributes