All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Ross Zwisler <zwisler@google.com>, Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Subject: Re: broken link in bpf/bpf_devel_QA
Date: Sun, 19 Feb 2023 10:02:33 +0700	[thread overview]
Message-ID: <Y/GRSd/ZfFGnGQ+4@debian.me> (raw)
In-Reply-To: <Y++09LKx25dtR4Ow@google.com>

[-- Attachment #1: Type: text/plain, Size: 1791 bytes --]

On Fri, Feb 17, 2023 at 10:10:12AM -0700, Ross Zwisler wrote:
> Hi,
> 
> I was checking out this page:
> 
> https://docs.kernel.org/bpf/bpf_devel_QA.html
> 
> and noticed that we have two links to .rst pages that are getting converted to
> links in different ways.  This one:
> 
>   See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
>   document for further documentation.
> 
> is getting converted to a full external link:
> 
>   <p>See the kernels selftest <a class="reference external"
>   href="https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html">Documentation/dev-tools/kselftest.rst</a>
>   document for further documentation.</p>
> 
> While this one:
> 
>   Finally to ensure support for latest BPF Type Format features -
>   discussed in `Documentation/bpf/btf.rst`_
> 
> Is left as a short local link to a nonexistent .rst page:
> 
>   <p>Finally to ensure support for latest BPF Type Format features - discussed
>   in <a class="reference external"
>   href="btf.rst">Documentation/bpf/btf.rst</a> 
> 
> <snipped>...
> 
> Given that the page source for these two links are basically the same:
> 
>  `Documentation/dev-tools/kselftest.rst`
>  and
>  `Documentation/bpf/btf.rst`
> 
> I'm guessing this is an issue with how Sphinx is generating the resulting
> html, probably because it's trying to generate a more 'local' sort link for
> the btf.rst page?

I see that the issue is due to link handling when the external link
target is actually internal link sibling (i.e. the same level as doc where
the target is link from).

The fix is to simply use internal link mechanism. I will send the patch
as reply to this message shortly.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-02-19  3:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 17:10 broken link in bpf/bpf_devel_QA Ross Zwisler
2023-02-19  3:02 ` Bagas Sanjaya [this message]
2023-02-19  3:09   ` [PATCH] Documentation: bpf: Fix link to BTF doc Bagas Sanjaya
2023-02-21 18:18   ` broken link in bpf/bpf_devel_QA Ross Zwisler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y/GRSd/ZfFGnGQ+4@debian.me \
    --to=bagasdotme@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=zwisler@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.