Re: Missing hyperlinks in HTML docs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 20, 2012 at 10:43:08PM +0200, Michael Hertling wrote:

> 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.

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).

Signed-off-by: Jeff King <peff@xxxxxxxx>
---
 Documentation/asciidoc.conf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index 6d06271..a26d245 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -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[]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]