]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/asciidoc.conf
Documentation: fix "gitlink::foobar[s]"
[thirdparty/git.git] / Documentation / asciidoc.conf
CommitLineData
d1c2e113
SV
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
babfaba2 10[attributes]
4c7100a9
JH
11plus=&#43;
12caret=&#94;
a3e65d74
JF
13startsb=&#91;
14endsb=&#93;
54bd2558 15tilde=&#126;
babfaba2 16
d1c2e113
SV
17ifdef::backend-docbook[]
18[gitlink-inlinemacro]
19{0%{target}}
20{0#<citerefentry>}
21{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
22{0#</citerefentry>}
23endif::backend-docbook[]
24
e920b565 25ifdef::backend-docbook[]
7f55cf45 26ifndef::docbook-xsl-172[]
e920b565 27# "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
7f55cf45 28# v1.72 breaks with this because it replaces dots not in roff requests.
e920b565
FD
29[listingblock]
30<example><title>{title}</title>
31<literallayout>
281a53bb
JP
32ifdef::doctype-manpage[]
33&#10;.ft C&#10;
34endif::doctype-manpage[]
e920b565 35|
281a53bb
JP
36ifdef::doctype-manpage[]
37&#10;.ft&#10;
38endif::doctype-manpage[]
e920b565
FD
39</literallayout>
40{title#}</example>
7f55cf45 41endif::docbook-xsl-172[]
e920b565
FD
42endif::backend-docbook[]
43
d3d4fa86 44ifdef::doctype-manpage[]
7ef195ba
FL
45ifdef::backend-docbook[]
46[header]
47template::[header-declarations]
48<refentry>
49<refmeta>
50<refentrytitle>{mantitle}</refentrytitle>
51<manvolnum>{manvolnum}</manvolnum>
52<refmiscinfo class="source">Git</refmiscinfo>
4159c578 53<refmiscinfo class="version">{git_version}</refmiscinfo>
7ef195ba
FL
54<refmiscinfo class="manual">Git Manual</refmiscinfo>
55</refmeta>
56<refnamediv>
57 <refname>{manname}</refname>
58 <refpurpose>{manpurpose}</refpurpose>
59</refnamediv>
60endif::backend-docbook[]
d3d4fa86 61endif::doctype-manpage[]
7ef195ba 62
d1c2e113
SV
63ifdef::backend-xhtml11[]
64[gitlink-inlinemacro]
65<a href="{target}.html">{target}{0?({0})}</a>
66endif::backend-xhtml11[]