Use equivalent of InterWiki links in doxygen documentation markup

doxygen

31 просмотра

1 ответ

44 Репутация автора

Some of my doxygen documentation need to refer to pages in the company's wiki. I would prefer if these references resulted in working hypertext links in the generated documentation. I could of course achieve this by writing:

/// <a href="http:://long-URL.com/wiki/index.php?Name-of-page">Name of page</a>

or alternatively using Markdown syntax:

/// [Name of wiki page](http://long-URL.com/wiki/index.php?Name-of-page)

Unfortunately I have to give the full URL at every link in both cases, and when (as has already happened) the base URL of our company/wiki changes, all the URLs needs updating.

I therefore wonder if Doxygen has some support to avoid having to hardcode the entire URL at every link?

For comparison, wikis use "InterMap" or "InterWiki", to define prefixes that allow a shorthand notation for quickly referring to pages on another web site. Example:

See WikiPedia:InterWiki_Links for more details.

So if possible I would like to let the Doxygen documentation contain something like:

// See CompanyWiki:Name_of_wiki_page for bla bla

Some references:

Автор: chr Источник Размещён: 18.07.2016 07:40

Ответы (1)


1 плюс

12372 Репутация автора

Решение

You could define an alias in the config file:

ALIASES += WikiPedia{2}="<a href=\"http://long-URL.com/wiki/index.php?\1\">\2</a>"

and then use it in your comments like so

See \WikiPedia{InterWiki_Links,Interwiki Links} for more details.

See also http://www.doxygen.org/manual/custcmd.html for more info.

Автор: doxygen Размещён: 19.07.2016 07:20
Вопросы из категории :
32x32