freebsd-doc/shared/lib
Li-Wen Hsu 1d899c1c6f
PackagesMacro: Extend the syntax to category/name@flavor[pkgname]
The package macro creates a link to the web interface of the port's
origin directory in the ports repository.  Extend its usage to cover the
case when we want to refer to a speicifed flavor of a port.

For example, if we want to refer the aarch64-gcc12 pacakge, in the past
we can only specify its origin port, like `pacakge:devel/freebsd-gcc12`,
and unable to add the `@aarch64` flavor suffix because it creates a
broken link.  This change makes it strip the suffix after `@` and accept
a parameter of package name as link text.  If not provided, use the origin
as the original behavior.

Thus we can have this kind of notation:

    package:devel/freebsd-gcc12@aarch64[aarch64-gcc12]

which creates linkt to:

    https://cgit.freebsd.org/ports/tree/devel/freebsd-gcc12/

with link text:

    aarch64-gcc12

Reviewed by:	carlavilla, dbaio
Differential Revision: https://reviews.freebsd.org/D39067
2023-03-20 00:09:25 +08:00
..
CrossDocumentReferencesMacro Build offline documentation using Hugo and other improvements 2021-11-03 17:44:52 +01:00
GitReferencesMacro
InterDocumentReferencesMacro Fix link references in single book 2022-12-07 19:22:10 +01:00
ManPageMacro macro/ManPage: Update the address of the manual pages 2023-01-28 17:15:38 -03:00
PackagesMacro PackagesMacro: Extend the syntax to category/name@flavor[pkgname] 2023-03-20 00:09:25 +08:00
cross-document-references-macro.rb Build offline documentation using Hugo and other improvements 2021-11-03 17:44:52 +01:00
git-macro.rb
inter-document-references-macro.rb
man-macro.rb
packages-macro.rb
sectnumoffset-treeprocessor.rb