Skip to content

Commit a14b3b5

Browse files
kwagyemanclaude
andcommitted
docs/conf: Repoint source links to micropython-doc.
GitHub blob URLs can't navigate into submodules, so links to the parent openmv-doc path always 404. Switch "Edit this page" and the AI dropdown's raw-source links back to micropython-doc/<sha>/docs/ where the RST sources actually live. The user-facing navbar/footer GitHub icon (html_theme_options["github_url"]) is independent and still points at openmv/openmv. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3799832 commit a14b3b5

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

docs/conf.py

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,16 @@
3838
build_date = _dt.date.today().strftime("%d %b %Y")
3939

4040
# Values exposed to topindex.html and footer templates.
41-
# Resolve the parent (openmv-doc) repo's HEAD SHA at build time so
42-
# "Edit this page" and the AI dropdown's raw-source link both pin to
43-
# the exact commit that produced the page. Falls back to "master" if
44-
# `git` isn't available (e.g. shallow tarball checkouts).
41+
# Resolve this submodule's HEAD SHA at build time so "Edit this
42+
# page" and the AI dropdown's raw-source link both pin to the exact
43+
# commit that produced the page. The RST files physically live in
44+
# openmv/micropython-doc — the parent openmv-doc repo only carries
45+
# a submodule pointer, so GitHub blob URLs there 404. Falls back to
46+
# "master" if `git` isn't available.
4547
try:
46-
_parent_repo = os.path.abspath(
47-
os.path.join(os.path.dirname(__file__), "..", "..")
48-
)
4948
source_version = subprocess.check_output(
5049
["git", "rev-parse", "HEAD"],
51-
cwd=_parent_repo,
50+
cwd=os.path.dirname(os.path.abspath(__file__)),
5251
stderr=subprocess.DEVNULL,
5352
).decode().strip()
5453
except Exception:
@@ -58,16 +57,14 @@
5857
"openmv_version": openmv_version,
5958
"micropython_version": micropython_version,
6059
"build_date": build_date,
61-
# Tells Shibuya where the page source lives — used by the "Edit
62-
# this page" link, and as a fallback for the AI dropdown's
63-
# "Open in ChatGPT/Claude/Perplexity" raw-source links when
64-
# html_baseurl isn't reachable. Points at the user-facing
65-
# openmv-doc parent repo (GitHub renders submodule contents
66-
# through the parent's path).
60+
# "Edit this page" + AI raw-source links point at the submodule
61+
# repo where the RST source actually lives. The user-facing
62+
# navbar/footer GitHub icon is controlled separately by
63+
# html_theme_options["github_url"].
6764
"source_type": "github",
6865
"source_user": "openmv",
69-
"source_repo": "openmv-doc",
70-
"source_docs_path": "/micropython/docs/",
66+
"source_repo": "micropython-doc",
67+
"source_docs_path": "/docs/",
7168
"source_version": source_version,
7269
}
7370

0 commit comments

Comments
 (0)