Open dianakhuang opened 1 month ago
To automate edx.org theming for MFEs, we can use one of these approaches:
[inform] FYI, if it helps, another possible approach to add to the mix is also using the Paragon CLI command install-theme
that performs the @edx/brand
NPM aliasing with --no-save
), e.g.: https://github.com/openedx/frontend-template-application/blob/e97ab533571b39159691bcf7ea6d7f435a46b2bf/package.json#L19 (largely does approach 2 behind the scenes)
{
"scripts": {
"start:with-theme": "paragon install-theme && npm start && npm install"
}
}
README: https://github.com/openedx/paragon?tab=readme-ov-file#available-commands Command source: https://github.com/openedx/paragon/blob/38a3e8383087cc15eeeac7a9e0deeaf39e5ded78/lib/install-theme.js
You may also supply the desired theme in the command itself (versus relying on the manual input prompt), e.g.:
paragon install-theme @edx/brand-edx.org@2
Perhaps the Paragon CLI install-theme
command could be integrated with Docker for MFEs (e.g., perhaps devstack's microfrontend.yml
file that MFEs extend via docker-compose.yml
could execute paragon install-theme
based on an optional environment variable like PARAGON_BRAND_PACKAGE
set per MFE). Food for thought.
Note: this approach with the install-theme
CLI command requires Paragon at least v21.2.0+ to be installed.
This will be blocked by the migration of devstack configuration work. https://github.com/edx/edx-arch-experiments/issues/588
We would like the edx.org theme to be on by default for edx-platform and for MFEs when starting/provisioning a new devstack.
Instructions for edx-platform
For MFEs, this probably requires the installation of the edx-branded header and footer.
Acceptance Criteria: