Inconsistent use of absolute and relative paths to https://www.coronawarn.app
See original GitHub issueWhere to find the issue
All of the website https://www.coronawarn.app.
Describe the issue
Website repository sources inconsistently use absolute and relative paths to refer to locations on https://www.coronawarn.app.
For instance in faq.json #who_can_help https://github.com/corona-warn-app/cwa-website/blob/44cf83c5d945f3c9a87b2846880b9f37e9b5af47/src/data/faq.json#L30
"The various feedback channels of the <a href='https://www.coronawarn.app/en/community/'>Corona-Warn-App-Community<a/> will help you with your questions about the open source project of the Corona-Warn-App."
uses the absolute path https://www.coronawarn.app/en/community/
, whereas in a following article #how_to_contribute instead a relative path /en/community/
is used instead:
"Collaboration within the community follows a defined code of conduct. You can find all the guidelines for participation <a href='/en/community/'>here</a>."
Consequence of using absolute paths
Using absolute paths to the https://www.coronawarn.app/ web in hyperlinks prevents portability. It means, for instance, that a local test (running npm start
) on http://localhost:8000
or a cypress test (running npm run test
) is not cleanly testing the cloned or checked out branch. It is testing a hybrid of a local test web and the production instance of the web on https://www.coronawarn.app.
Suggested change
Firstly it should be decided by the Open Source Team if there is a preference to use relative links inside https://www.coronawarn.app.
If yes, then update contribution best practice documentation accordingly.
After that, existing web content could be refactored to conform the convention of preferring relative links. New content should conform to any new recommendations.
Internal Tracking ID: EXPOSUREAPP-10069
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (16 by maintainers)
Top GitHub Comments
Now closing, as the original issue: “Website repository sources inconsistently use absolute and relative paths to refer to locations on https://www.coronawarn.app.” has been resolved and the suggestion to “update contribution best practice documentation accordingly.” has been implemented in WRITE_BLOG_POSTS.md#link-to-other-locations for blog posts.
Perhaps it would be good to create a best practice document WRITE_FAQ_ARTICLES as well? The recommendations in WRITE_BLOG_POSTS.md#link-to-other-locations for the blog
*.md
source files don’t directly apply to thefaq.json
/faq_de.json
source files. The general recommendation from the Open Source Team to avoid absolute paths is documented in the short statement in https://github.com/corona-warn-app/cwa-website/issues/1819#issuecomment-934432503 “We should use relative paths.”.Good morning @MikeMcC399! Thanks for all this ‘clean-up’ work!