Skip to content

Add support for runtime theming config

Description

Runtime theming needs certain site configuration changes that are quite verbose but can be easily created based on a few parameters. This PR adds a new GROVE_MFE_THEME_CDN_ORIGIN that provides the base origin from where the CSS themes will be loaded, and combines this with the theme name to automatically set up the theme based on the format used by paragon to build them.

For instance, if the themes are hosted on S3 at "https://test.s3.us-east-1.amazonaws.com/themes", you can set that to the CDN origin and supply the theme name via mfe_theme for each LMS entry in the grove additional domain. If the theme name is "test-theme" the paragon URL will then be set to
https://test.s3.us-east-1.amazonaws.com/themes/test-theme.min.css

Supporting information

grove!280 (merged) opencraft/documentation/tech!11 (merged)

Testing instructions

Steps to test the changes:

  1. Build and upload a theme to a CDN
  2. Supply the location via GROVE_MFE_THEME_CDN_ORIGIN and the theme name via mfe_theme
  3. Use the runtime-theme versions of MFE
  4. Test that the theme is loading

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • Git commit history is clean
  • Git commits are following conventional-commit practices
  • Unit tests are added/updated
  • Documentation is added/updated

Additional context

Add any other context about the merge request here.

Edited by Kshitij Sobti

Merge request reports

Loading