Description
Problem statement
Currently docs links are hard-coded to docs.openedx.org; many installations may want to override one or more of these link mappings to their own help sites or internal documentation libraries.
For example, all the links in openedx/frontend-app-authoring#1757
Proposed solution
Create a helper function, getExternalLinkUrl(default_link)
, that reads from a json blob that specifies replacement links for existing links that individual frontend-app repos have. The json blob should be defined in a global place and is not required for deploys. It is only required if installations wish to override links.
The json blob will be in the following format:
{
"https://docs.openedx.org/en/latest/educators/how-tos/course_development/manage_course_highlight_emails.html": "myinstance-help.edu/path/to/doc.html"
}
that is, the default link will be the key and the desired replacement is the value.
This function will live in frontend-platform
, within src/config.js
, next to get_config
.
Alternatives considered
- Leveraging custom translations: Use the translations infrastructure to override the links within strings. This would be problematic because instances with multiple languages would potentially need to update hundreds/thousands of translations, and would fall out of sync with upstream translations and string changes.
- Leveraging plugin slots: This was not chosen because of the complexity for operators to make hundreds of plugin configs just to override links.
Support
cc @arbrandes @brian-smith-tcril @tonybusa
Whiteboard:
