2017-09-17 15:32:39 +00:00
|
|
|
<!-- Specify your Handlebars template here.
|
|
|
|
|
|
|
|
The following JavaScript context will be passed to the template:
|
2017-10-02 22:48:01 +00:00
|
|
|
|
2017-09-17 15:32:39 +00:00
|
|
|
{
|
|
|
|
files: [{
|
|
|
|
name: 'The filename',
|
|
|
|
content: {
|
|
|
|
text: 'The file content',
|
|
|
|
html: '<p>The file content</p>',
|
|
|
|
yamlProperties: 'The file properties in YAML format',
|
|
|
|
properties: {
|
|
|
|
// Computed file properties object
|
|
|
|
},
|
|
|
|
toc: [
|
|
|
|
// Table Of Contents tree
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
|
2017-10-02 22:48:01 +00:00
|
|
|
You can use Handlebars built-in helpers and the custom StackEdit ones:
|
|
|
|
|
2017-09-26 22:54:26 +00:00
|
|
|
{{#tocToHtml files.0.content.toc}}{{/tocToHtml}} will produce a clickable TOC.
|
2017-10-02 22:48:01 +00:00
|
|
|
|
2017-09-23 19:01:50 +00:00
|
|
|
{{#tocToHtml files.0.content.toc 3}}{{/tocToHtml}} will limit the TOC depth to 3.
|
2017-09-17 15:32:39 +00:00
|
|
|
-->
|
2017-09-23 19:01:50 +00:00
|
|
|
|