Closed slisznia closed 9 years ago
I believe either of these will work:
textChunk = theme.makeChunk("filename.txt"); textChunk = theme.makeChunk("filename", "txt"); mdChunk = theme.makeChunk("filename.md"); mdChunk = theme.makeChunk("filename", "md");
Thanks!
If you have snippets of content defined inside those files a la {#snippet}an extra chunk of template{#} then you can even refer to those directly like so:
Chunk mdChunklet = theme.makeChunk("filename.md#snippet");
Perhaps this paragraph can be relaxed and/or updated with the info you just provided:
http://www.x5software.com/chunk/wiki/#Leave_out_the_extension.21
On 07/06/2015 12:16 PM, Tom McClure wrote:
If you have snippets of content defined inside those files a la {#snippet}an extra chunk of template{#} then you can even refer to those directly like so:
Chunk mdChunklet = theme.makeChunk("filename.md#snippet");
— Reply to this email directly or view it on GitHub https://github.com/tomj74/chunk-templates/issues/6#issuecomment-118928597.
Slawomir Lisznianski Developer at PushCoin
Ah, thanks. This was a fairly recent change, and I missed updating that piece of the docs. Fixed!
We have template files that are TXT or Markdown, .txt .md respectively. Unfortunately they are not located by chunk, which insists on chtml. Being a generic, non-html specific engine, this appears to be an unnecessary limitation.
What is the suggested way of handling non-html text files?