diff mbox series

[libgpiod,v2,2/3] doc: improve the readability of the prefix variable

Message ID 20250605-rust-docs-v2-2-883a0a3872c0@linaro.org
State Superseded
Headers show
Series doc: add rust docs | expand

Commit Message

Bartosz Golaszewski June 5, 2025, 8:13 a.m. UTC
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 mbox series

Patch

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}",
         ],