Compiling a Theme#
To update a theme, you compile the Sass files to create the CSS files that style your UI when you apply the theme.
Update a Theme for the LMS or Studio#
To update a theme for Studio or the LMS, follow these steps.
Log in to the Open edX machine as the
edxappuser.Change to the
/edx/app/edxapp/edx-platformdirectory.Execute the
npm run compile-sasscommand to update all themes.If you want to update specific themes, use the arguments described in the following table.
Argument
Description
--theme-dirsProvide a space-separated list of the theme directories that you want to update. Only files in the theme directories that you include are updated.
--themesProvide a space-separated list of the themes that you want to update. Only the themes that you include are updated.
Update a Theme for the E-commerce Service#
For the E-commerce service, commands are available for you to update all themes at once, or to update only the themes you specify.
To update a theme for the E-commerce service, follow these steps.
Log in to the server for the E-commerce service as the
ecommerceuser.Change to the
/edx/app/ecommerce/ecommercedirectory.To update all themes, execute one of these commands.
make migratepython manage.py update_assets
To specify a theme or set of themes to update, or to include optional arguments, execute
python manage.py update_assetswith the options described in the following table.Argument
Description
--settingsProvide the name of a Django settings module in Python package syntax. For example,
--settings=ecommerce.settings.production.--themesProvide a space-separated list of the themes that you want to update. Only the themes that you include are updated.
--output-styleDefines the coding style for the compiled CSS files. Possible values are
nested,expanded,compact, andcompressed. The default value isnested.--skip-systemDisables Sass file compilation for the default Sass files provided in the Open edX software. Use this option if you have only updated the Sass files in your theme.
--skip-collectOnly compile the Sass files and do not deploy the resulting CSS files.
--enable-source-commentsInclude the location of the source file as comments in the resulting CSS files. Enabling this argument can be useful when you are testing a theme.
Maintenance chart
Review Date |
Working Group Reviewer |
Release |
Test situation |