@matheusbsbs / matheus-bagliano / commits / d1c2e113c5
Fork 0

[PATCH] Documentation: Add asciidoc.conf file and gitlink: macro

Introduce an asciidoc.conf file with the purpose of adding a gitlink: macro which will improve the manpage output. Original cogito patch by Jonas Fonseca <fonseca@diku.dk>; asciidoc.conf from that patch was further enhanced to use the proper DocBook tag <citerefentry> for references to man pages. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>

Sergey Vlasov committed Sep 19, 2005 at 14:10 UTC d1c2e113c5b6bb580bb345fc9bc56e0b8712d070
2 files changed +23 -2
Documentation/Makefile
+2 -2
@@ -57,13 +57,13 @@ clean:
57 rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html
58
59 %.html : %.txt
60 - asciidoc -b xhtml11 -d manpage $<
60 + asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
61
62 %.1 %.7 : %.xml
63 xmlto man $<
64
65 %.xml : %.txt
66 - asciidoc -b docbook -d manpage $<
66 + asciidoc -b docbook -d manpage -f asciidoc.conf $<
67
68 git.html: git.txt ../README
69
Documentation/asciidoc.conf new
+21
@@ -0,0 +1,21 @@
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 +ifdef::backend-docbook[]
11 +[gitlink-inlinemacro]
12 +{0%{target}}
13 +{0#<citerefentry>}
14 +{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
15 +{0#</citerefentry>}
16 +endif::backend-docbook[]
17 +
18 +ifdef::backend-xhtml11[]
19 +[gitlink-inlinemacro]
20 +<a href="{target}.html">{target}{0?({0})}</a>
21 +endif::backend-xhtml11[]