Add "Go To Source" for Docs?

Sönke Ludwig via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 8 23:50:00 PDT 2016


Am 08.10.2016 um 23:49 schrieb Jacob:
> Well a lot of the times I'm browsing the phobos library documentation I
> want to go to the source code, but there's no easy way to go there
> directly from the docs. Some modules have a link to the source file but
> I think that's done manually as many of them don't. I think it'd be
> beneficial to have a way to tell the doc generator to include a "go to
> source" button at each doc entry of function/type. With the option to
> set a github repo or other link as the destination of the link, it
> should also include the line number when outputting the docs. Might be a
> bit specific for github there though, as setting the line number just
> involves adding a number to the end of the link. Whereas being able to
> set a local file as a link might be desired as well. But I don't think
> you can tell the OS to open the file at a certain line with just a file
> uri.

The documentation under http://dlang.org/library/ has such a link at the 
top of each page. See for example 
http://dlang.org/library/std/algorithm/comparison/either.html


More information about the Digitalmars-d mailing list