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, documentMarkdown: selectedFileDesc.content,
strippedDocumentMarkdown: selectedFileDesc.content.substring(selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter.length : 0), strippedDocumentMarkdown: selectedFileDesc.content.substring(selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter.length : 0),
documentHTML: htmlWithoutComments, documentHTML: htmlWithoutComments,
documentHTMLWithFrontMatter: (selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter : '') + htmlWithoutComments,
documentHTMLWithComments: htmlWithComments, documentHTMLWithComments: htmlWithComments,
frontMatter: selectedFileDesc.frontMatter, frontMatter: selectedFileDesc.frontMatter,
publishAttributes: undefined, publishAttributes: undefined,

View File

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

View File

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