lunarmodules / ldoc

LDoc is a LuaDoc-compatible documentation generator which can also process C extension source. Markdown may be optionally used to render comments, as well as integrated readme documentation and pretty-printed example files.
https://lunarmodules.github.io/ldoc/
Other
784 stars 173 forks source link

Best practice for including readme text in index page for a multi-module project? #174

Open GrahamHannington opened 10 years ago

GrahamHannington commented 10 years ago

I'm currently including readme-style text for my project's index page directly in ldoc.ltp, marked up in HTML. This works, but I'd prefer to keep that text in a separate .md file, and include it in ldoc.ltp via some type of reference. What's the best way to do that?

stevedonovan commented 9 years ago

Good question! So basically we need an @include directive, that would directly inject HTML from the Markdown into the template. Seems very doable, let me look at the best way to do this.

stevedonovan commented 9 years ago

@include is not a perfect solution, but it's a start. Have a look at the new tests/styles/opt.lua example (run as ldoc -c opt.ld opt.lua). Simply includes processed text into the document, so usually best to use with Markdown formatting. We have to clarify what the 'search path' for this tag should be, apart from relative to the directory where ldoc is running.

alerque commented 1 year ago

I'm a bit confused by this, how is this not what the existing readme setting in the config does if you specify a Markdown file?