You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a simple markdown-based blog using Caddy. One issue I'm running in to though, is when I try to include the markdown file to splitFrontMatter on it (or later to render it), I run into an issue where the contents of the markdown file are parsed as a template.
A possible workaround for this is to set between on the templates directive as linked here, but, again, this is more of a workaround than a real fix. Specifically, this fix wouldn't work in the case where you're trying to document how you created the blog, in a blog post, since you'd need to show the templates in that post!
What I'm proposing is a includeRaw template function, where the contents of the file are read and returned, but without parsing the given file as a template, to prevent issues like the infinite recursion I was hitting when trying to use include in my use case.
The text was updated successfully, but these errors were encountered:
The idea was that I could avoid having to do weird escaping on the source markdown file, such that it would render the same as it would in any other markdown renderer.
I'm trying to create a simple markdown-based blog using Caddy. One issue I'm running in to though, is when I try to include the markdown file to
splitFrontMatter
on it (or later to render it), I run into an issue where the contents of the markdown file are parsed as a template.A possible workaround for this is to set
between
on thetemplates
directive as linked here, but, again, this is more of a workaround than a real fix. Specifically, this fix wouldn't work in the case where you're trying to document how you created the blog, in a blog post, since you'd need to show the templates in that post!What I'm proposing is a
includeRaw
template function, where the contents of the file are read and returned, but without parsing the given file as a template, to prevent issues like the infinite recursion I was hitting when trying to useinclude
in my use case.The text was updated successfully, but these errors were encountered: