-
Notifications
You must be signed in to change notification settings - Fork 31
Markdown
#Markdown and Other Formats
If you want to turn markdown, wiki markup, docbook, and other formats into html, with working hyperlinks, then pandoc is your friend. Install it, and then put this plugin in your config file.
plugin {
type = markdown
desc = markdown file
suffix = md
content = application/markdown
program = pandoc -f markdown -t html %i
outtype = H
}
With this in place, you can git clone this wiki, and read the files locally. It's a lot less cluttered sans the github overhead. Start with Home.md and off you go. Also, many packages include md files in a README directory. If you install software, you want to be able to read those.
Although pandoc can generate pdf, it doesn't read pdf, so you need another converter to render those. This plugin requires down_url, because pdftohtml cannot take a url, it can only read a local file. We must download the url into a temp file first. In contrast, pandoc can read a url, so we can pull markdown from the internet and display it directly. Well sometimes. Pandoc understands http, but not https, so perhaps that plugin should contain down_url as well.
plugin {
type = pdf
desc = pdf file
suffix = pdf
content = application/pdf
down_url
program = pdftohtml -i -noframes %i %o >/dev/null
outtype = H
}