hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
310 stars 60 forks source link

#include markdown file? #126

Closed ricopicone closed 6 years ago

ricopicone commented 6 years ago

I'm writing documentation for a GitHub project in Doconce and would like to have the first section simply be the README.md of the main project. I found in the documentation that Doconce documents can be written in Markdown and, separately, that subfiles can be included in a main Doconce document with #include. However, it's not clear to me how to (or if it is possible to) include a markdown file in a main Doconce .do.txt file. What I'm trying is (in the docs directory, where the Doconce documentation resides):

# #include "../README.md"

However, the result doesn't appear to be formatted as if the interpreter knows the included README is in markdown. Is there an #include option flag or something? I couldn't find one in the documentation. Thanks for any help!

ricopicone commented 6 years ago

It occurs to me that we could go the other way: perhaps the first section of the Doconce document could be saved as README.md. Is there a way to export a section as a separate markdown document?

KGHustad commented 6 years ago

You could have README.do.txt as a separate file and include it in your documentation. And then you could generate README.md with

doconce format pandoc README --github_md