How to include an external file with Markdown?
Jan Erik Moström
lists at mostrom.pp.se
Fri Aug 10 14:27:59 EDT 2007
Matthew Wilson <matt at tplus1.com> 07-08-10 12:29
>I'm building a website that has a common header across lots of pages and I
>want to source in that header. How do I do this with markdown?
Take the result from Markdown and put it into a template (which
contains the header etc), in it's simplest form it's just a
search and replace. For example:
theTemplate = "<html> .... <body> .... ##PageContent## ... </html>
print searchAndReplace(theTemplate, "##PageContent##", Markdown(
pageContent ) )
Something like that.
Jan Erik Moström, www.mostrom.pp.se
More information about the Markdown-Discuss