Fix hardcoded base URLs so PR previews load assets correctly#120
Merged
Conversation
…tibility Components and pages hardcoded /RMC-Software-Documentation/ for figure/video src paths, counter JSON fetches, bibliography lookups, and version metadata. Under PR preview builds the active baseUrl differs, so those requests resolved against the production deploy instead — breaking new figures, captions, cross-references, and citations on preview builds. React components and pages now use useBaseUrl(); the analyticsEvents client module uses siteConfig.baseUrl from @generated/docusaurus.config.
|
✅ CI build passed for commit This PR does not touch documentation content under @usace-rmc/docs-admin may merge. |
|
📄 Preview deployed for commit https://usace-rmc.github.io/RMC-Software-Documentation-Previews/pr-120/ This preview updates automatically when new commits are pushed. Deleted when the PR closes. |
AdamGohs
added a commit
that referenced
this pull request
May 20, 2026
Resolves a conflict in src/pages/desktop-applications/lifesim.js by adopting main's centralized docConfig pattern from PR #117. Flipped the LifeSim Applications Guide entry in src/docConfig.js to active:true so the doc renders on the PR-116 preview during review (previously encoded inline as active:true on this branch). Brings in the baseUrl fix from PR #120 so figures, captions, and references on the preview resolve against the preview baseUrl instead of production.
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.
Summary
/RMC-Software-Documentation/paths in 15 components, 13 landing pages, and the analytics client module withuseBaseUrl()(React) andsiteConfig.baseUrlfrom@generated/docusaurus.config(client module)./RMC-Software-Documentation-Previews/pr-N/) instead of the production prefix — fixing broken figures, missing caption numbers, and unresolved figure/table/equation/citation references on previews.DOCUSAURUS_BASE_URL=/RMC-Software-Documentation-Previews/pr-test/); the built HTML emits correctly-prefixed asset URLs in both environments.