The basic idea is you can render markdown as HTML using templates:
templates
Then you’ll need a templated file that runs the {{markdown}} action. You can see how we render our Markdown docs as HTML in our own GitHub repo:
That might be a little more advanced than what you need. But the basic idea is there. You’ll also need to rewrite requests to your .md files to go to your template file so they can render the requested Markdown file instead.
Optional:
You can also treat your README filenames as “index” files:
file_server {
index README.md index.html
...
}
for example. That will prevent directory listings when a README.md file is present, if you want to just show the readme instead. But that’s optional.
I’d be open to discussing ways to make this easier, but we did something like this in v1 with a markdown directive. The problem is that Markdown files, by themselves, aren’t generally useful for display as part of a website. There’s no styles or JS, there’s no header, footer, or nav. It’s just a plain-looking, bare-bones HTML document. Maybe that’s fine, but we found most people needed the ability to put markdown within something like a template.
And templates allow you to preface your Markdown with front matter, which can be used in the template as variables/values!