US-GHG-Center / veda-config-ghg

Veda config for GHG
https://ghg-demo.netlify.app
Other
3 stars 15 forks source link

Relative links in MDX? #361

Closed j08lue closed 1 month ago

j08lue commented 2 months ago

We have a link in this page: https://staging.earth.gov/ghgcenter/data-catalog/epa-ch4emission-yeargrid-v2express

Where we have hard-coded the hostname (https://earth.gov):

https://github.com/US-GHG-Center/veda-config-ghg/blob/535e8ac303d458c555c2775d03b9ea4b9a92adc0/datasets/epa-ch4emission-yeargrid-v2express.data.mdx?plain=1#L2643

image

This means that on the staging version (https://staging.earth.gov/ghgcenter/data-catalog/epa-ch4emission-yeargrid-v2express), this link still points to the production version and same for the previews (https://ghg-demo.netlify.app).

Acceptance criteria

siddharth0248 commented 1 month ago

PR : https://github.com/US-GHG-Center/veda-config-ghg/pull/383

siddharth0248 commented 1 month ago

In current demo preview /ghgcenter/exploration?search=epa-ch4emission-yeargrid-v2express&datasets=%5B%5D won't work. It should be /exploration?search=epa-ch4emission-yeargrid-v2express&datasets=%5B%5D

But for earth.gov relative link needs to have ghgcenter

j08lue commented 1 month ago

Yes, seems like there is a reason why these are absolute links, so not just something to fix in the content. Let's keep this open for now and see when the UI team can look into it.

j08lue commented 1 month ago

Ah, I see @hanbyul-here is already getting involved. 😄

I thought <Link> component handles this problem already

👌