dauxio / daux.io

Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

Home Page:https://daux.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Best-practice to generate API docs from source code

webpunk opened this issue · comments

We currently use daux.io to create the "prose pages" of our documentation (e.g. the chapters "Overview", "Terminology", etc.).
Furthermore we use "jsduck" to automatically document the API from our source. We then link to this documentation from daux.io. Of course this also means that we have two different systems and two different layouts for our documentation.

Is there any best-practice to use daux.io in such a way that - automated - an API is documented from the source code?

Hello,

I don't think I can provide you exactly this, however, you can look into the Processors : https://daux.io/For_Developers/Creating_a_Processor.html to programmatically create new pages.

Using this you should be able to add new files that would correspond to your API definitions. They can be in markdown (supported by default) or you can also add new file types ( for example for a legacy documentation I added the mustache templating language. )

You could also add a new file type that is a plain html file that would then put the content in the page without processing.

Sorry, me again. I get an error message while building the docs when using the default Processor.php. I am building the docs using "bin/daux generate -c docs/config.json --processor=Processor.php". After that, i get the following error message:

[RuntimeException]
Class '\Todaymade\Daux\Extension\Processor.php' not found. We cannot use it as a Processor

Thanks for your kind support!

Hi, no problem :)

I think .php is not needed at the end of the --processor=Processor argument

Hmmm... actually, I get this error when calling "bin/daux generate -c docs/config.json --processor=Processor.php" (with the .php extension).

Oh sorry. I should actually READ what to wrote before complaining ;-). It actually works fine when I remove the .php extension. Sorry & thanks for the help

Haha, no worries :)
Glad it helped