From d1c2e113c5b6bb580bb345fc9bc56e0b8712d070 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Mon, 19 Sep 2005 14:10:14 +0400 Subject: [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 37b7fcb..822098a 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 0000000..baefb2f --- /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[] -- cgit v0.10.2-6-g49f6