From d1c2e113c5b6bb580bb345fc9bc56e0b8712d070 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Mon, 19 Sep 2005 14:10:14 +0400 Subject: [PATCH] [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 --- Documentation/Makefile | 4 ++-- Documentation/asciidoc.conf | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Documentation/asciidoc.conf 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[] -- 2.26.2