bchedx

Enable and apply a default theme

edX provides some default themes that you can find in the /opt/bitnami/apps/edx/edx-platform/themes/ directory. To enable and apply a default theme for edX, follow the steps in the sequence shown:

Enable a default theme

  • To enable a default theme for LMS, open the /opt/bitnami/apps/edx/conf/lms.yml file and edit the “COMPREHENSIVE_THEME_DIRS” and the “ENABLE_COMPREHENSIVE_THEMING” variables to make them look like this:

      COMPREHENSIVE_THEME_DIRS:
      - /opt/bitnami/apps/edx/edx-platform/themes
      - /opt/bitnami/apps/edx/var/themes
      ...
      ENABLE_COMPREHENSIVE_THEMING: true,
    
  • To enable a default theme for CMS, open the /opt/bitnami/apps/edx/conf/cms.yml file and perform the same changes described above.

Apply a default theme

  • Access the Django administration console. Check the Django Admin Console instructions for more information.

  • Browse to “Theming -> Site themes -> Add site theme”.

  • From the “Site menu”, select the site you want to apply a theme to.

  • Enter the identifier of the theme (same as its directory name) and click on “Save”. In the example below, the selected default theme is “red-theme”.

    Add site and theme

    The theme will be enabled for the specified site as it is shown below:

    Theme enabled

Build assets for a custom theme

  • If you enabled the custom theme for LMS, update LMS assets:

      $ sudo /opt/bitnami/apps/edx/bin/edxapp-update-assets-lms
    
  • If you enabled the custom theme for CMS, update CMS assets:

      $ sudo /opt/bitnami/apps/edx/bin/edxapp-update-assets-cms
    
  • Restart the Apache server:

      $ sudo /opt/bitnami/ctlscript.sh restart apache
    
Last modification January 20, 2021