public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Petr Vorel <pvorel@suse.cz>, Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Subject: Re: Links to sources in docs
Date: Mon, 12 Jan 2026 13:06:53 +0200	[thread overview]
Message-ID: <7b0539f874af71c899c21acfd71288fe7a2d8246@intel.com> (raw)
In-Reply-To: <20260109173112.GA105682@pevik>

On Fri, 09 Jan 2026, Petr Vorel <pvorel@suse.cz> wrote:
> Hi Jonathan, all,
>
> I wonder how links in sources work.
>
> Documentation/userspace-api/check_exec.rst has:
>
> `samples/check-exec/inc.c`_ example.

There's this bit at the end of check_exec.rst that defines the link:

.. _samples/check-exec/inc.c:
   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/samples/check-exec/inc.c

The content within the backticks is just the link text, and has no
filename semantics. See [1] for details.


HTH,
Jani.


[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks


>
> which leads to link to the source [1]. But if i try to use the same pattern in
> Documentation/trace/fprobe.rst:
>
> -See Filter Commands in `Documentation/trace/ftrace.rst`.
> +See Filter Commands in Documentation/trace/ftrace.rst.
>
> it does not work:
>
> Documentation/admin-guide/bug-hunting.rst:54: ERROR: Unknown target name: "scripts/decode_stacktrace.sh". [docutils]
>
> Kind regards,
> Petr
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/samples/check-exec/inc.c
>

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-01-12 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 17:31 Links to sources in docs Petr Vorel
2026-01-12 11:06 ` Jani Nikula [this message]
2026-01-12 13:26   ` Petr Vorel
2026-01-13 12:32     ` Petr Vorel
2026-01-13 13:26       ` Jani Nikula

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=7b0539f874af71c899c21acfd71288fe7a2d8246@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=pvorel@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox