An open edX theme for MITx Online
- Configure Open edX
- Configuring MITx Online theme
Please follow Configure Open edX.
For detail about themes, please see edx-docs about themes.
Make sure you have MITx Online base url set in your settings. You can either add it in env
files or simply add it in edx-platform/lms/envs/private.py
. e.g
MARKETING_SITE_BASE_URL="http://localhost:8013"
To apply themes in Open edX you have to add the absolute path of the themes directory to the COMPREHENSIVE_THEME_DIRS
in lms.yml
and studio.yml
respectively.
That path should be accessible to docker container. Easiest way is to put your theme in edx-platform/themes
.
If you have your theme along with other themes at edx-platform/themes/mitxonline-theme
, you can use /edx/app/edxapp/edx-platform/themes
as directory path while you follow the steps below.
First of all you open lms/studio shell e.g. make lms-shell
or make studio-shell
For the LMS, you edit /edx/etc/lms.yml
and for Studio, you edit /edx/etc/studio.yml
to set below properties
ENABLE_COMPREHENSIVE_THEMING: true
COMPREHENSIVE_THEME_DIRS:
- '/edx/app/edxapp/edx-platform/themes'
For the LMS, you edit /edx/app/edxapp/lms.env.json
and For the Studio, you edit /edx/app/edxapp/cms.env.json
to set below properties
"ENABLE_COMPREHENSIVE_THEMING": true
"COMPREHENSIVE_THEME_DIRS": [
"/edx/app/edxapp/edx-platform/themes"
],
Restart LMS and Studio
docker-compose restart lms studio
Use the following file structure:
edx-platform
└──mitxonline-theme
├── cms
└── lms
└── static
└── templates
To apply a theme to an Open edX site, follow these steps.
- Sign in to the Django administration console for your base URL. For example, http://{your_URL}/admin.
- Select Site themes.
- Select Add site theme.
- From the Site menu, select the site you want to apply a theme to. You can select default site.
- In the Theme dir name field, enter the
mitxonline-theme
of the theme. - Select Save.
$ make lms-shell
$ paver update_assets --themes mitxonline-theme