From: Sergey Vlasov Date: Mon, 19 Sep 2005 10:10:14 +0000 (+0400) Subject: [PATCH] Documentation: Add asciidoc.conf file and gitlink: macro X-Git-Tag: v0.99.8~109 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d1c2e113c5b6bb580bb345fc9bc56e0b8712d070;p=git.git [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 ; asciidoc.conf from that patch was further enhanced to use the proper DocBook tag for references to man pages. Signed-off-by: Sergey Vlasov Signed-off-by: Junio C Hamano --- diff --git a/Documentation/Makefile b/Documentation/Makefile index 37b7fcb97..822098ad9 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -57,13 +57,13 @@ clean: rm -f *.xml *.html *.1 *.7 howto-index.txt howto/*.html %.html : %.txt - asciidoc -b xhtml11 -d manpage $< + asciidoc -b xhtml11 -d manpage -f asciidoc.conf $< %.1 %.7 : %.xml xmlto man $< %.xml : %.txt - asciidoc -b docbook -d manpage $< + asciidoc -b docbook -d manpage -f asciidoc.conf $< git.html: git.txt ../README diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf new file mode 100644 index 000000000..baefb2f0d --- /dev/null +++ b/Documentation/asciidoc.conf @@ -0,0 +1,21 @@ +## gitlink: macro +# +# Usage: gitlink:command[manpage-section] +# +# Note, {0} is the manpage section, while {target} is the command. +# +# Show GIT link as: (
); if section is defined, else just show +# the command. + +ifdef::backend-docbook[] +[gitlink-inlinemacro] +{0%{target}} +{0#} +{0#{target}{0}} +{0#} +endif::backend-docbook[] + +ifdef::backend-xhtml11[] +[gitlink-inlinemacro] +{target}{0?({0})} +endif::backend-xhtml11[]