|
|
|
The FreeBSD
man2html CGI also contains man pages from other groups, such as the XFree86
and NetBSD projects. We wanted a way
to refer to them as well in our documentation, and to have the links created,
so we came up with this.
|
|
|
|
Essentially, we
use the vendor attribute on the citerefentry element to select which group of
man pages we’re interested in. If we
leave this blank then we want FreeBSD man pages.
|
|
|
|
The
$create-refentry-xref-link$ function has been slightly updated. First, it now collects the contents of the
vendor attribute, if it exists, and puts it in the “v” variable. It also creates the URL and puts it in the
“u” variable, instead of returning it directly. Finally, it looks at the value of “v”, and appends another CGI
variable, “manpath” to the end of the URL, depending on the contents of the
vendor string.
|
|
|
|
If
$create-refentry-xref-link$ had taken just the name of the manpage and its
section number, as I commented earlier, this change would have had a larger
impact on all the customisation layers on top of this one. But because the function was given the
node as an argument, it could work everything else out for itself.
|