flutterdartdart-pubdartdoc

Did `dartdoc` drop support for generating markdown documentation? If yes, is there an alternative solution?


I want to generate documentation for my flutter project, which will later be published to its GitHub wiki via a pipeline (this question is not about how I could set up such a pipeline).

As a first step, I want to generate the documentation in Markdown. As far as I can see it, GitHub wiki pages can not be written in pure HTML and Markdown is probably the most popular choice for markup.

I looked into the dart doc documentation and its configuration options but it seems that it only generates HTML and has no option to output Markdown.

Then, I searched for alternatives and found dartdoc. I read this post and followed these instructions.

They are basically:

  1. Get dartdoc via dart pub global activate dartdoc
  2. Run it via dart pub global run dartdoc.
  3. To generate Markdown run dart pub global run dartdoc --format=md instead.

However, in the end I get this message in the terminal:

Building package executable... 
Built dartdoc:dartdoc.
 fatal error: Could not find an option named "format".

It also displays all available options and their descriptions but I can not find any information for generating Markdown.

The instructions I used worked for dartdoc 6.1.2. However, I have installed dartdoc 8.0.8. The newest version would be dartdoc 8.0.10 but dependency conflicts keep me from upgrading to it.

So, did I miss anything? Did dartdoc drop support for generating Markdown? If yes, are there alternatives for documentation generation I am not aware of that are able to generate Markdown documentation files for flutter/ dart projects?


Solution

  • Per the post you linked to, --format=md was not properly generating Markdown anyway. That post linked to a corresponding GitHub issue, and that issue was "fixed" by removing the --format flag.

    Regarding alternatives: