Documentation / asciidoc.confon commit Documentation: Add version information to man pages (7ef195b)
   1## gitlink: macro
   2#
   3# Usage: gitlink:command[manpage-section]
   4#
   5# Note, {0} is the manpage section, while {target} is the command.
   6#
   7# Show GIT link as: <command>(<section>); if section is defined, else just show
   8# the command.
   9
  10[attributes]
  11caret=^
  12startsb=&#91;
  13endsb=&#93;
  14tilde=&#126;
  15
  16ifdef::backend-docbook[]
  17[gitlink-inlinemacro]
  18{0%{target}}
  19{0#<citerefentry>}
  20{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
  21{0#</citerefentry>}
  22endif::backend-docbook[]
  23
  24ifdef::backend-docbook[]
  25# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
  26[listingblock]
  27<example><title>{title}</title>
  28<literallayout>
  29|
  30</literallayout>
  31{title#}</example>
  32endif::backend-docbook[]
  33
  34ifdef::backend-docbook[]
  35[header]
  36template::[header-declarations]
  37<refentry>
  38<refmeta>
  39<refentrytitle>{mantitle}</refentrytitle>
  40<manvolnum>{manvolnum}</manvolnum>
  41<refmiscinfo class="source">Git</refmiscinfo>
  42<refmiscinfo class="version">@@GIT_VERSION@@</refmiscinfo>
  43<refmiscinfo class="manual">Git Manual</refmiscinfo>
  44</refmeta>
  45<refnamediv>
  46  <refname>{manname}</refname>
  47  <refpurpose>{manpurpose}</refpurpose>
  48</refnamediv>
  49endif::backend-docbook[]
  50
  51ifdef::backend-xhtml11[]
  52[gitlink-inlinemacro]
  53<a href="{target}.html">{target}{0?({0})}</a>
  54endif::backend-xhtml11[]
  55
  56