You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several markdown files under content/ link to local routes using absolute production URLs (e.g. https://www.open-emr.org/demo/, /chat, /donate/, /blog/post/...) instead of relative paths. On any non-production deploy — the GitHub Pages staging site at https://openemr.github.io/website-openemr/, a local hugo server, or any future preview build — clicking these links jumps the user from the build they're previewing back to the live production site, defeating the point of the preview.
Background
PR #93 fixes the staging site's broken stylesheets by overriding Hugo's baseURL at deploy time, so the staging build now emits same-origin asset URLs. That fix only covers asset URLs Hugo generates from baseURL — it does not rewrite absolute URLs that are hard-coded into markdown content. Templates under layouts/ and themes/openemr/layouts/ are already clean (no audit findings there); only content files are affected.
External references (wiki at open-emr.org/wiki/..., forum at community.open-emr.org, third-party sites) are intentional and out of scope.
Verify that each match resolves to a route that actually exists in content/ (e.g. content/demo/, content/chat/, content/donate/ or content/give/ — note donate may now redirect to give per PR #81; check current state) before rewriting.
Approach
Run the grep above to get the current list of offenders.
For each match, confirm a corresponding local route exists, then rewrite the URL to the relative form Hugo expects:
https://www.open-emr.org/demo/ → /demo/
https://www.open-emr.org/chat → /chat/
https://www.open-emr.org/donate/ → /give/ (verify; donation route may have moved)
https://www.open-emr.org/blog/post/<slug>/ → /blog/<slug>/ (note: theme uses /:contentbasename/ permalinks per config.yaml:200, so the historical /blog/post/ segment is a redirect from the WordPress era and may no longer correspond to a current Hugo route — verify each slug resolves before rewriting)
For any URL whose local equivalent does NOT exist (e.g. an old GSoC blog post that was never migrated to this Hugo site), leave it absolute or remove the link entirely — don't fabricate routes that 404.
Build locally with hugo server and click each rewritten link to confirm it resolves.
Out of scope
External links to community.open-emr.org, open-emr.org/wiki/..., GitHub, third-party sites — those are intentionally absolute.
Menu and download URLs in config.yaml — same reason.
Template changes under layouts/ or themes/openemr/layouts/ — already clean.
git grep -nE 'https?://(www\.)?open-emr\.org/(demo|chat|donate|give|support|modules|blog/|blog$)' -- 'content/' returns no results, OR each remaining hit is documented in the PR as intentionally absolute (with a reason).
Local hugo server build: every rewritten link resolves to a real page (no 404s introduced).
Staging build at https://openemr.github.io/website-openemr/ (after merge): the same rewritten links stay within openemr.github.io/website-openemr/ instead of jumping to www.open-emr.org.
Problem
Several markdown files under
content/link to local routes using absolute production URLs (e.g.https://www.open-emr.org/demo/,/chat,/donate/,/blog/post/...) instead of relative paths. On any non-production deploy — the GitHub Pages staging site at https://openemr.github.io/website-openemr/, a localhugo server, or any future preview build — clicking these links jumps the user from the build they're previewing back to the live production site, defeating the point of the preview.Background
PR #93 fixes the staging site's broken stylesheets by overriding Hugo's
baseURLat deploy time, so the staging build now emits same-origin asset URLs. That fix only covers asset URLs Hugo generates frombaseURL— it does not rewrite absolute URLs that are hard-coded into markdown content. Templates underlayouts/andthemes/openemr/layouts/are already clean (no audit findings there); only content files are affected.External references (wiki at
open-emr.org/wiki/..., forum atcommunity.open-emr.org, third-party sites) are intentional and out of scope.Files / Symbols
Confirmed offenders (path:line — link target):
content/blog/covid19.md:37—https://www.open-emr.org/donate/content/blog/openemr-a-great-long-term-choice.md:22—https://www.open-emr.org/demo/content/blog/openemr-a-great-long-term-choice.md:28—https://www.open-emr.org/chatcontent/blog/openemr-offers-panel-of-turn-key-solutions-with-amazons-cloud-services.md:18—https://www.open-emr.org/blog/post/openemr-announces-initial-availability-of-openemr-cloud-on-aws/content/blog/openemr-offers-panel-of-turn-key-solutions-with-amazons-cloud-services.md:31—https://www.open-emr.org/blog/post/hurricane-maria-puerto-rico-openemr-success/content/blog/openemr-version-501-released-ushers-in-golden-age-for-openemr.md:30,32—https://www.open-emr.org/blog/post/embracing-docker/content/blog/openemr-version-501-released-ushers-in-golden-age-for-openemr.md:30,36—https://www.open-emr.org/blog/post/openemr-at-wonca-2017/content/blog/openemr-version-501-released-ushers-in-golden-age-for-openemr.md:30,38—https://www.open-emr.org/blog/post/success-at-healthhacks-2017/content/blog/openemrs-gsoc-2020-resounding-success.md:21—https://www.open-emr.org/blog/gsoc-2020-hybrid-appcontent/blog/openemrs-gsoc-2020-resounding-success.md:23—https://www.open-emr.org/blog/gsoc-2020-work-product-modernize-openemr-user-interfacecontent/blog/openemrs-gsoc-2020-resounding-success.md:25—https://www.open-emr.org/blog/gsoc-2020-work-product-fhir-integration-in-openemrcontent/summer-of-code/_index.md:98—https://www.open-emr.org/chatcontent/winter-of-code/_index.md:17—https://www.open-emr.org/chatcontent/winter-of-code/_index.md:17—https://www.open-emr.org/blog/you-can-be-a-openemr-developer-in-5-easy-steps/content/winter-of-code/_index.md:47—https://www.open-emr.org/chatcontent/support/_index.md:28—https://www.open-emr.org/chatThere may be more once you run a fresh search — see Reproduction.
Reproduction
From a fresh clone of the repo, list the candidates with:
Verify that each match resolves to a route that actually exists in
content/(e.g.content/demo/,content/chat/,content/donate/orcontent/give/— notedonatemay now redirect togiveper PR #81; check current state) before rewriting.Approach
https://www.open-emr.org/demo/→/demo/https://www.open-emr.org/chat→/chat/https://www.open-emr.org/donate/→/give/(verify; donation route may have moved)https://www.open-emr.org/blog/post/<slug>/→/blog/<slug>/(note: theme uses/:contentbasename/permalinks perconfig.yaml:200, so the historical/blog/post/segment is a redirect from the WordPress era and may no longer correspond to a current Hugo route — verify each slug resolves before rewriting)hugo serverand click each rewritten link to confirm it resolves.Out of scope
community.open-emr.org,open-emr.org/wiki/..., GitHub, third-party sites — those are intentionally absolute.config.yaml— same reason.layouts/orthemes/openemr/layouts/— already clean.baseURL/ Pages staging fix — handled in PR ci(deploy): override baseURL for Pages staging build #93.Definition of done
git grep -nE 'https?://(www\.)?open-emr\.org/(demo|chat|donate|give|support|modules|blog/|blog$)' -- 'content/'returns no results, OR each remaining hit is documented in the PR as intentionally absolute (with a reason).hugo serverbuild: every rewritten link resolves to a real page (no 404s introduced).openemr.github.io/website-openemr/instead of jumping towww.open-emr.org.