Links were 404-ing because they used /refdog/... but content is actually at /docs/refdog/...
Set the correct prefix to match your MkDocs site_dir:
REFDOG_SITE_PREFIX="/docs/refdog" ./regenerate-refdog.shWhen you browse to a refdog page, look at the URL:
http://127.0.0.1:8080/docs/refdog/concepts/index.html
^^^^^^^^^^^^^ this is your prefix
site_dir: output/docs # ← The "/docs" partIf site_dir ends with /docs, your prefix should include /docs.
-
Regenerate with a prefix:
REFDOG_SITE_PREFIX="/docs/refdog" ./regenerate-refdog.sh -
Rebuild MkDocs and test a link
-
If it works ✅ → prefix is correct!
-
If 404 ❌ → try without
/docs:REFDOG_SITE_PREFIX="/refdog" ./regenerate-refdog.sh
| Your Setup | Prefix to Use |
|---|---|
MkDocs serves at /docs/ |
/docs/refdog |
MkDocs serves at root / |
/refdog |
Refdog in subdirectory /reference/ |
/reference |
| Refdog at root | `` (empty) |
The regenerate-refdog.sh script now defaults to /docs/refdog to match your setup.
After regenerating, check a generated file:
grep -m 3 'href=' refdog/input/concepts/index.mdShould show links like:
href="/docs/refdog/concepts/site.html"Not:
href="/refdog/concepts/site.html" ← Wrong, would 404- Regenerated with correct prefix
- MkDocs rebuilds without errors
- Navigate to any refdog page
- Click links - they should work!
- Cross-section links work (concepts → commands, etc.)
-
Check browser DevTools Network tab - What URL is being requested?
-
Check actual file location - Does that file exist at that path?
-
Try different prefix - Experiment with
/docs/refdog,/refdog, or empty -
Check MkDocs output - Where are files actually being built?
find output -name "site.html" | head -5
The file locations should match the link paths!