mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Can I use a html template file to generate html from markdown? #553
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kunlinyu on GitHub (Aug 25, 2022).
I use a string "header" and a string "footer", and connect them (header + html + footer) to get the full html.
Can I use a html template file to achieve this?
@xoofx commented on GitHub (Aug 25, 2022):
I'm not sure to understand. Do you ask if markdig provides a templating engine or are you asking if your code is correctly using markdig?
@kunlinyu commented on GitHub (Aug 25, 2022):
@xoofx
What I want is, using a html template file "template.html.in":
to generate the whole html file
My question is, does MarkDig has such kind of feature?
@xoofx commented on GitHub (Aug 25, 2022):
There is no such feature and no plan to implement this. In your example above, replacing
@MARKDOWN@is onestring.Replaceaway. Templating should be done at different level, usually with a templating engine (like Scriban) as it often requires conditionals/loops and variables to be anything useful.@kunlinyu commented on GitHub (Aug 25, 2022):
@xoofx
Thanks. Understand.