summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/Makefile4
-rw-r--r--Documentation/asciidoc.conf21
2 files changed, 23 insertions, 2 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 37b7fcb97d..822098ad9c 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 0000000000..baefb2f0da
--- /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: <command>(<section>); if section is defined, else just show
+# the command.
+
+ifdef::backend-docbook[]
+[gitlink-inlinemacro]
+{0%{target}}
+{0#<citerefentry>}
+{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
+{0#</citerefentry>}
+endif::backend-docbook[]
+
+ifdef::backend-xhtml11[]
+[gitlink-inlinemacro]
+<a href="{target}.html">{target}{0?({0})}</a>
+endif::backend-xhtml11[]