From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Vincent Fazio <vfazio@xes-inc.com>,
Kent Gibson <warthog618@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Erik Schilling <erik@riscstar.com>,
Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH libgpiod v2 2/3] doc: improve the readability of the prefix variable
Date: Thu, 05 Jun 2025 10:13:20 +0200 [thread overview]
Message-ID: <20250605-rust-docs-v2-2-883a0a3872c0@linaro.org> (raw)
In-Reply-To: <20250605-rust-docs-v2-0-883a0a3872c0@linaro.org>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Currently the default value for prefix - indicating the current
directory - is an empty string. This means that if we do
"{prefix}/foo", we may end up pointing to the root directory which is
not what we want. Make "./" be the default value so that the example
becomes valid and add "/" where we couldn't do it before.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
docs/conf.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index d89c13454baa8fbe9dab17b7c3fde6fc59b577f1..04d1cea2a2175166555993c3e936e7cf1ebd0fe6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -61,15 +61,15 @@ html_theme = "sphinx_rtd_theme" if sphinx_rtd_theme else "default"
def make_glib_docs(app):
# For some reason on RTD we're in the docs/ directory while during a local
# build, we're still in the top source directory.
- prefix = "../" if os.getenv("READTHEDOCS") == "True" else ""
+ prefix = "../" if os.getenv("READTHEDOCS") == "True" else "./"
subprocess.run(
[
"gi-docgen",
"generate",
"--config",
- f"{prefix}bindings/glib/gi-docgen.toml",
- f"{prefix}bindings/glib/Gpiodglib-1.0.gir",
+ f"{prefix}/bindings/glib/gi-docgen.toml",
+ f"{prefix}/bindings/glib/Gpiodglib-1.0.gir",
"--output-dir",
f"{app.outdir}",
],
--
2.48.1
next prev parent reply other threads:[~2025-06-05 8:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 8:13 [PATCH libgpiod v2 0/3] doc: add rust docs Bartosz Golaszewski
2025-06-05 8:13 ` [PATCH libgpiod v2 1/3] doc: reformat conf.py with black Bartosz Golaszewski
2025-06-05 8:13 ` Bartosz Golaszewski [this message]
2025-06-05 8:13 ` [PATCH libgpiod v2 3/3] doc: integrate rust docs into the sphinx build Bartosz Golaszewski
2025-06-05 8:27 ` [PATCH libgpiod v2 0/3] doc: add rust docs Erik Schilling
2025-06-05 8:58 ` Viresh Kumar
2025-06-10 7:50 ` Bartosz Golaszewski
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=20250605-rust-docs-v2-2-883a0a3872c0@linaro.org \
--to=brgl@bgdev.pl \
--cc=bartosz.golaszewski@linaro.org \
--cc=erik@riscstar.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=vfazio@xes-inc.com \
--cc=viresh.kumar@linaro.org \
--cc=warthog618@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).