Missing hyperlinks in HTML docs
Dear Git community,
beginning with v1.7.11-rc3, some HTML docs built along with Git are lacking hyperlinks on my system. Steps to reproduce, e.g.:
gunzip -c git-1.7.11.rc3.tar.gz | tar xf -
(cd git-1.7.11.rc3 && ./configure && make -C Documentation git.html)
The resulting git.html does not have hyperlinks to the individual Git commands, making this file somewhat useless. Doing the same with v1.7.11-rc2, i.e.
gunzip -c git-1.7.11.rc2.tar.gz | tar xf -
(cd git-1.7.11.rc2 && ./configure && make -C Documentation git.html)
shows that git.html does have the expected hyperlinks; e.g., diffing git-1.7.11.rc{2,3}/Documentation/git.html reveals the following hunk:
@@ -964,7 +964,6 @@
<h3 id="_main_porcelain_commands">Main porcelain commands</h3> <div class="dlist"><dl>
<dt class="hdlist1">
-<a href="git-add.html">git-add(1)</a>
</dt>
<dd>
<p>
Other files, e.g. git-add.html, are affected, too.
AFAICS, this is caused by fe77b41, more precisely the change of the Documentation/asciidoc.conf file. Indeed, reverting that commit on v1.7.11-rc3 results in git.html containing hyperlinks as expected.
Can anyone confirm this? If so, is this intended behaviour? So far, I haven't found any clues in the release notes / mailing list / etc. Am I doing something wrong? Do I miss something? Thanks for any hint.
Regards,
Michael
Quoted 14 lines · Michael Hertling
shows that git.html does have the expected hyperlinks; e.g., diffing git-1.7.11.rc{2,3}/Documentation/git.html reveals the following hunk:
(quoted diff) +0
-1@@ -964,7 +964,6 @@ <h3 id="_main_porcelain_commands">Main porcelain commands</h3> <div class="dlist"><dl> <dt class="hdlist1"> -<a href="git-add.html">git-add(1)</a> </dt> <dd> <p>Other files, e.g. git-add.html, are affected, too.
Quoted 7 lines
AFAICS, this is caused by fe77b41, more precisely the change of the
Documentation/asciidoc.conffile. Indeed, reverting that commit on v1.7.11-rc3 results in git.html containing hyperlinks as expected.Can anyone confirm this? If so, is this intended behaviour? So far, I haven't found any clues in the release notes / mailing list / etc. Am I doing something wrong? Do I miss something? Thanks for any hint.
Eek. I can easily replicate it here. The problem is that the new git-relative-html-prefix attribute is not defined by default (whereas we want it defined but blank). Which puzzles me, as I thought I tested how fe77b41 impacted files outside of technical/. But obviously I screwed something up.
The patch below should solve it.
-- >8 --
Subject: docs: always define git-relative-html-prefix attribute
Commit fe77b41 introduced a new attribute to let the linkgit macro create cross-directory HTML references from the technical/ and howto/ subdirectories back to the main documentation. We define that attribute to "../" on the command-line when building inside those subdirectories, and otherwise leave it unset under the assumption that it would default to being blank. Instead, asciidoc omits the link entirely, leading to broken documentation. Fix this by defining git-relative-html-prefix to blank in asciidoc.conf (and an instance on the command-line, when present, will override it).
--- Documentation/asciidoc.conf | 2 ++ 1 file changed, 2 insertions(+)
Documentation/asciidoc.conf +2 -0
@@ -90,6 +90,8 @@ endif::backend-docbook[] endif::doctype-manpage[] ifdef::backend-xhtml11[] +[attributes] +git-relative-html-prefix= [linkgit-inlinemacro] <a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a> endif::backend-xhtml11[]
Quoted 1 line · Jeff King
The patch below should solve it.
Yes, it does. Many thanks for your quick reply and the patch.
Regards,
Michael