Skip to content

fix(docs): correct iframe path for embedded 3-D twins#70

Open
harsh-pandhe wants to merge 1 commit into
mainfrom
fix/case-study-twin-iframe-path
Open

fix(docs): correct iframe path for embedded 3-D twins#70
harsh-pandhe wants to merge 1 commit into
mainfrom
fix/case-study-twin-iframe-path

Conversation

@harsh-pandhe
Copy link
Copy Markdown
Owner

Summary

The case-study pages embed the interactive 3-D twin via <iframe src="<slug>_outputs/twin.html">. With mkdocs's default use_directory_urls: true, the page lives at /case_studies/<slug>/ but the twin is at /case_studies/<slug>_outputs/twin.htmlone level up. The relative path resolved to /case_studies/<slug>/<slug>_outputs/twin.html and 404'd.

Prefix with ../ on all 12 pages.

Why

Surfaced during the pre-demo smoke test — the 3-D twin failed to load on every case-study page. The browser even helpfully recursed back into the mkdocs app inside the iframe.

Test plan

  • mkdocs build succeeds
  • Manual: refresh /case_studies/ngong_ping_360/ and confirm the twin renders inline
  • All 12 case-study pages patched

mkdocs use_directory_urls renders the page at /case_studies/<slug>/
but the twin.html lives at /case_studies/<slug>_outputs/twin.html —
one level up. The iframe src was <slug>_outputs/twin.html, which
resolved to /case_studies/<slug>/<slug>_outputs/twin.html and 404'd.

Prefix with ../ so the path resolves correctly on all 12 case-study
pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant