Skip to content

Commit 226daba

Browse files
Martin Ågrengitster
authored andcommitted
Doc/Makefile: give mansource/-version/-manual attributes
Rather than hardcoding "Git Manual" and "Git" as the manual and source in asciidoc.conf, provide them as attributes `manmanual` and `mansource`. Rename the `git_version` attribute to `manversion`. These new attribute names are not arbitrary, see, e.g., [1]. For AsciiDoc (8.6.10) and Asciidoctor <1.5.7, this is a no-op. Starting with Asciidoctor 1.5.7, `manmanual` and `mansource` actually end up in the xml-files and eventually in the rendered manpages. In particular, the manpage headers now render just as with AsciiDoc. No versions of Asciidoctor pick up the `manversion` [2], and older versions don't pick up any of these attributes. -- We'll fix that with a bit of a hack in the next commit. [1] https://asciidoctor.org/docs/user-manual/#man-pages [2] Note how [1] says "Not used by Asciidoctor". Signed-off-by: Martin Ågren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 75b2f01 commit 226daba

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Documentation/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ ASCIIDOC_HTML = xhtml11
122122
ASCIIDOC_DOCBOOK = docbook
123123
ASCIIDOC_CONF = -f asciidoc.conf
124124
ASCIIDOC_COMMON = $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \
125-
-agit_version=$(GIT_VERSION)
125+
-amanversion=$(GIT_VERSION) \
126+
-amanmanual='Git Manual' -amansource='Git'
126127
TXT_TO_HTML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML)
127128
TXT_TO_XML = $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK)
128129
MANPAGE_XSL = manpage-normal.xsl

Documentation/asciidoc.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ template::[header-declarations]
7878
<refmeta>
7979
<refentrytitle>{mantitle}</refentrytitle>
8080
<manvolnum>{manvolnum}</manvolnum>
81-
<refmiscinfo class="source">Git</refmiscinfo>
82-
<refmiscinfo class="version">{git_version}</refmiscinfo>
83-
<refmiscinfo class="manual">Git Manual</refmiscinfo>
81+
<refmiscinfo class="source">{mansource}</refmiscinfo>
82+
<refmiscinfo class="version">{manversion}</refmiscinfo>
83+
<refmiscinfo class="manual">{manmanual}</refmiscinfo>
8484
</refmeta>
8585
<refnamediv>
8686
<refname>{manname}</refname>

0 commit comments

Comments
 (0)