docs: point the source links at something the published site can reach - #4
Open
egeboy35 wants to merge 1 commit into
Open
docs: point the source links at something the published site can reach#4egeboy35 wants to merge 1 commit into
egeboy35 wants to merge 1 commit into
Conversation
egeboy35
force-pushed
the
docs/fix-links-that-escape-the-site
branch
from
September 1, 2026 12:28
b8ec265 to
e88f6ee
Compare
.github/workflows/deploy-docs.yml runs `mkdocs gh-deploy` on every push to
main, and mkdocs serves docs/ alone. A link like
[tools.py](../../edgeLLM/edge_agent/src/edge_agent/tools.py)
from docs/curriculum/ therefore leaves the site and 404s for every reader,
while resolving perfectly for anyone browsing the repository locally -- which
is why it survives review.
`mkdocs build` on main says so itself: 90 warnings, all of this shape, across
14 documents.
The repository already links to source files the way that works, in these same
pages:
[`tools.py`](https://github.com/lkk688/edgeAI/blob/main/edgeLLM/edge_agent/src/edge_agent/tools.py)
This makes 84 more links consistent with that, across 7 documents. Every
rewritten target was checked to exist in the tree first.
mkdocs build warnings: 90 -> 23
Twenty-two of the 23 that remain are links whose target is under jetson/ or
raspberrypi/. I left those alone deliberately: I have no Jetson and have not
run anything in those directories, so I would rather not touch pages I cannot
check the surrounding claims of. They are the same one-line change if you want
them. The 23rd points at curriculum/11_final_challenges_hackathon.md, which
does not exist anywhere in the repository -- the curriculum runs 10, 11, 11b,
12... so it looks renamed or dropped, and I did not want to guess which.
Two things I caught in my own first pass and did not send:
* The first version rewrote 111 links, 26 of which pointed at pages and
figures *inside* docs/. Those already resolve, and turning a
docs/figures/*.JPG link into a blob URL would have replaced working images
with links to GitHub's file viewer. The rewrite now skips anything under
docs/.
* I had also written a test asserting no blob URL points back into docs/.
It fails on main, on a line this change does not touch --
00b_sjsujetsontool_cheatsheet.md:3 has linked to
blob/main/docs/curriculum/00_sjsujetsontool_guide.md since before this
branch. That is a rule I invented rather than a defect I measured, so the
test is gone.
Adds tests/test_docs_links.py -- 6 tests, standard library only, no network:
the GitHub URLs are checked against the working tree rather than fetched.
Against this branch: 6 passed. Against docs/ as it stands on main: 4 failed,
2 passed --
FAILED test_no_relative_link_escapes_the_published_site
FAILED test_the_heaviest_pages_carry_no_escaping_link[11_nextjs_nemotron_app.md]
FAILED test_the_heaviest_pages_carry_no_escaping_link[11b_nextjs_agent_lab.md]
FAILED test_the_heaviest_pages_carry_no_escaping_link[13_react_agent.md]
all four on behaviour; the suite adds no symbol to assert on. The jetson and
raspberrypi prefixes are a named exception in the test rather than a silent
skip, so re-fixing them later flips a list entry instead of a rule.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
egeboy35
force-pushed
the
docs/fix-links-that-escape-the-site
branch
from
September 1, 2026 12:43
e88f6ee to
2cb59f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.github/workflows/deploy-docs.ymlrunsmkdocs gh-deployon every push to main, and mkdocs servesdocs/alone. So a link likefrom
docs/curriculum/leaves the site and 404s for every reader — while resolving perfectly for anyone browsing the repository locally, which is why it survives review.mkdocs buildonmainsays so itself: 90 warnings, all of this shape, across 14 documents.The repo already does it the working way
In these same pages:
This makes 84 more links consistent with that, across 7 documents. Every rewritten target was checked to exist in the tree first.
What I left alone, and why
22 of the 23 remaining are links whose target is under
jetson/orraspberrypi/. I have no Jetson and have run nothing in those directories, so I would rather not edit pages whose surrounding claims I cannot check. They are the same one-line change if you want them — the test names those two prefixes as an explicit exception rather than skipping them silently, so re-fixing them later flips a list entry instead of a rule.The 23rd points at
curriculum/11_final_challenges_hackathon.md, which does not exist anywhere in the repository. The curriculum runs 10, 11, 11b, 12… so it looks renamed or dropped, and I did not want to guess which.Two things I caught in my own first pass and did not send
docs/. Those already resolve, and turning adocs/figures/*.JPGlink into a blob URL would have replaced working images with links to GitHub's file viewer. The rewrite now skips anything underdocs/.docs/. It fails onmain, on a line this change does not touch:00b_sjsujetsontool_cheatsheet.md:3has linked toblob/main/docs/curriculum/00_sjsujetsontool_guide.mdsince before this branch. That is a rule I invented rather than a defect I measured, so the test is gone.Tests
Adds
tests/test_docs_links.py— 6 tests, standard library only, no network: the GitHub URLs are checked against the working tree rather than fetched.Against this branch: 6 passed. Against
docs/as it stands onmain: 4 failed, 2 passed:All four fail on behaviour; this suite adds no symbol of its own to assert on.
pytest tests/test_docs_links.py mkdocs build # 90 warnings before, 23 after