On Friday, 24 February 2017 at 02:50:27 UTC, Nick Sabalausky (Abscissa) wrote:
What I'd kinda like to do is put together a D doc generator that uses, uhh, probably markdown.

My dpldocs.info generator continues to progress and I'm almost ready to call it beta and let other people use it.

It's syntax is a hybrid of ddoc and markdown. Take a look at the sample page: http://dpldocs.info/experimental-docs/test.html

Though I don't support user-defined macros, it just has a hardcoded list of common ones to support Phobos source, and then a bunch of "magic macros" and a few special syntaxes for really common things.

Like for links, I went with a Wikipedia-inspired [url|text] bracket. (or if it is just a url, you don't need to bracket it at all). You can also mention a name there, and it searches your imported namespaces to look it up.

import std.range;
/// See [isOutputRange] for more.
void foo() {}


That [isOutputRange] will look it up inside std.range and link straight to std.range.primitives.isOutputRange.

Or you can do like [http://dlang.org|The official D Website] and it will turn that into the natural <a href="http://dlang.org>The official D Website</a> for you.

There's a few more syntax things you can see in that sample link above and a few more I have planned, but I find it is already really pretty usable. And then, of course, it has enough knowledge of D to make even complex functions look pretty readable:

http://dpldocs.info/experimental-docs/std.algorithm.sorting.sort.html

http://dpldocs.info/experimental-docs/arsd.simpledisplay.SimpleWindow.this.1.html

and so on.

Reply via email to