Can My Open edX theme Be Mounted for Instant Updates?

Hello Open edX Team,

I hope you’re well. I have a question about theme management in my Open edX setup. Currently, I am using the standard Open edX theme and am not utilizing the Indigo theme. I use edx-platform and other components mounted so that changes are reflected immediately without needing to run any commands.

Is it possible to mount my theme in a way that allows me to see changes instantly, without having to use the build command or redeploy the platform? I’m looking for a more efficient method to streamline this process.

Any advice or suggestions would be greatly appreciated.

Thank you!

1 Like

Hi. I dont remember the exact details but I think some sass and/or static assets need to be compiled for theme frontend changes to appear. 4.3.1.2. Root Directories for Theme Files — Installing, Configuring, and Running the Open edX Platform documentation.

There is a tutorial in Tutor docs, please check it out Changing the appearance of Open edX — Tutor documentation.

@Syed_Muhammad_Dawoud

I am aware of this, and I am currently using it. However, in my current project, I don’t want to create a build every time I make a change. Is there any method to mount my changes directly so that they reflect immediately? This would save me time because, in production, the build process takes 30 minutes or more.

As you know, we can mount the Open edX platform and other related repositories, but I don’t think this approach applies to them.

I hope the Open edX community will address it soon. @regis some one else in tutor

If you add your theme folder in env/build/openedx/themes , it will automatically mount because tutor by default mount this path (env/…/themes) to /openedx/themes.

How to get the style changes without building the image?
After placing your theme at env/.../themes, one can run the watchtheme container. This container automatically detects changes in the theme and builds the static assets. This is for the dev case.

For local, I make changes to tutorIndigo plugin and run tutor config save. After that, I run this command in LMS container npm run compile-sass -- --theme indigo --theme-dir /openedx/themes --skip-cms --skip-default .

If there is any confusion above, then run npm run watch-sass in LMS container (whether dev or local). It will build the sass/styling/static asset.

Result: You can see the changes on re-loading the page without building the image or redeploying the system.

Note: The watch-theme command or running container will hang your system because this cmd/container continuously looks for changes and compiles the sass/styling files one by one (including lms sass, cms sass, custom-theme sass). I will recommend to use npm run compile-sass -- --theme themeName --theme-dir path-to-your-theme --skip-cms --skip-default in LMS container.
It won’t take enough time and just build your custom-theme. You can then see the changes by reloading the page.

2 Likes