Fix gatsby static images so they include the prefix path.
Previously if we built the doc site with a prefix path (like https://design.cms.gov/v/9.0.0/blog/release-7.0 having a prefix path of /v/9.0.0), the img src attribute would omit this prefix path and just assume the image was at /static/whatever-the-filename-is. Overriding this element ensures we include the prefix path always.
If you go look at https://design.cms.gov/v/9.0.0/blog/release-7.0, you'll notice that the image is being pulled from /static, which is actually from the root website, not this archived website. Unfortunately this bug will exist in all the old archived copies.
This also fixes the demo branches, which is why I updated the deploy-demo script in this commit.
How to test
Take a look at this demo, which now has a working image with the correct prefix path. Previously this blog-post image failed to load.
Checklist
[x] Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
[x] Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
[x] Selected appropriate Impacts, multiple can be selected.
Summary
Fix gatsby static images so they include the prefix path.
Previously if we built the doc site with a prefix path (like https://design.cms.gov/v/9.0.0/blog/release-7.0 having a prefix path of
/v/9.0.0
), the img src attribute would omit this prefix path and just assume the image was at/static/whatever-the-filename-is
. Overriding this element ensures we include the prefix path always.If you go look at https://design.cms.gov/v/9.0.0/blog/release-7.0, you'll notice that the image is being pulled from
/static
, which is actually from the root website, not this archived website. Unfortunately this bug will exist in all the old archived copies.This also fixes the demo branches, which is why I updated the
deploy-demo
script in this commit.How to test
Take a look at this demo, which now has a working image with the correct prefix path. Previously this blog-post image failed to load.
Checklist
[WNMGDS-####] Title
or [NO-TICKET] if this is unticketed work.Type
(only one) label for this PR, if it is a breaking change, label should only beType: Breaking
Impacts
, multiple can be selected.