Tutor plugin that simplifies branding an Open edX instance
Project description
Tutor Branding Plugin
This plugin customizes Open edX branding for Tutor, with a focus on Ulmo-era MFE theming.
Installation
pip install tutor-contrib-branding
This release targets Open edX Ulmo with Tutor 21.x.
Quick Start
- Register for free at branding.aulasneo.com. Follow the instructions to create and publish your theme. Copy the provided tutor command.
- Enable the
tutor-contrib-brandingplugin. - Paste the tutor command
- Restart services
Now you can tweak the theme parameters in https://branding.aulasneo.com and see the results in real time in your Open edX site (you might need to hard refresh or clear cache in your browser to see the changes).
Refer to the Branding documentation for more information.
Current approach
Branding is now centered on externally published Paragon theme assets. The Branding applications is an online editor that manages your Paragon assets and publishes it to be used in your Open edX site with no effort. It provides the tutor commands you need to link your site with the theme.
The supported path is:
- publish Paragon
core.cssand variant CSS files from your design-token theme - point MFEs at those assets with
BRANDING_PARAGON_THEME_URLS - configure logos and favicon explicitly with
BRANDING_MFE_LOGO_URL,BRANDING_MFE_LOGO_WHITE_URL,BRANDING_MFE_LOGO_TRADEMARK_URL, andBRANDING_MFE_FAVICON_URL - use
BRANDING_THEME_REPOSonly for comprehensive theme content that still belongs to legacy pages, mainly certificates and static pages
Official references:
- Open edX design tokens: https://docs.openedx.org/en/latest/community/release_notes/ulmo/design_tokens.html
frontend-platformtheming andPARAGON_THEME_URLS: https://github.com/openedx/frontend-platform/blob/master/docs/how_tos/theming.md
Configuring BRANDING_PARAGON_THEME_URLS
Set BRANDING_PARAGON_THEME_URLS to the PARAGON_THEME_URLS object expected by frontend-platform.
Example:
BRANDING_PARAGON_THEME_URLS:
core:
url: "https://cdn.example.com/theme/core.css"
defaults:
light: light
dark: dark
variants:
light:
url: "https://cdn.example.com/theme/light.css"
dark:
url: "https://cdn.example.com/theme/dark.css"
high-contrast-dark:
url: "https://cdn.example.com/theme/high-contrast-dark.css"
When multiple variants are declared, this plugin adds a footer theme selector to MFEs. It supports:
Auto- the configured default light variant
- the configured default dark variant, if present
- any additional variants declared under
BRANDING_PARAGON_THEME_URLS.variants
MFE logos and favicon
MFEs still expect explicit asset URLs for brand images.
Available settings:
BRANDING_MFE_LOGO_URLBRANDING_MFE_LOGO_WHITE_URLBRANDING_MFE_LOGO_TRADEMARK_URLBRANDING_MFE_FAVICON_URL
These values must be public URLs.
Catalog home page overlay
BRANDING_OVERLAY_HTML replaces the catalog home page overlay HTML when it is defined.
This value is passed through the org.openedx.frontend.catalog.home_page.overlay_html plugin slot and is only applied when the setting is set.
Catalog MFE and marketing site
By default, this plugin enables the catalog MFE, which replaces the home and the courses pages. If you have set marketing site, set BRANDING_ENABLE_CATALOG_MICROFRONTEND to False in order to redirect the home and courses pages to your marketing site URL instead.
Theme repositories and comprehensive theming
BRANDING_THEME_REPOS is still supported, but only for the remaining legacy/comprehensive theme surface.
That means:
- certificates
- legacy static pages
- other legacy Django-rendered theming needs that are still served from the comprehensive theme
Example:
BRANDING_THEME_REPOS:
- name: my-theme
url: https://github.com/myorg/my-theme.git
version: main
After updating the configuration:
tutor config save
tutor images build openedx
tutor local do init --limit branding
Notes:
- only one theme can be active at a time
- do not use
themeas a custom theme name; that name is reserved for the base theme directory - assign the theme in Django admin if you need to switch the active comprehensive theme for a site
Deprecated and removed settings
The following legacy build-time branding settings are no longer supported and have been removed in favor of externally published Paragon theme assets and runtime MFE configuration:
BRANDING_WELCOME_MESSAGEBRANDING_FOOTER_NAV_LINKSBRANDING_FOOTER_LEGAL_LINKSBRANDING_BACKGROUNDBRANDING_BG_PRIMARYBRANDING_BODYBRANDING_PRIMARYBRANDING_SECONDARYBRANDING_FONT_FAMILYBRANDING_BRANDBRANDING_SUCCESSBRANDING_INFOBRANDING_DANGERBRANDING_WARNINGBRANDING_LIGHTBRANDING_DARKBRANDING_ACCENT_ABRANDING_ACCENT_BBRANDING_HOMEPAGE_BG_IMAGEBRANDING_EXTRASBRANDING_OVERRIDESBRANDING_FONTSBRANDING_FONTS_URLSBRANDING_LMS_IMAGESBRANDING_CMS_IMAGESBRANDING_HIDE_DASHBOARD_SIDEBARBRANDING_HIDE_LOOKING_FOR_CHALLENGE_WIDGETBRANDING_FIT_COURSE_IMAGEBRANDING_INDEX_ADDITIONAL_HTMLBRANDING_FRONTEND_COMPONENT_HEADER_REPOBRANDING_FRONTEND_COMPONENT_FOOTER_REPOBRANDING_MFE_PLATFORM_REPOBRANDING_CERTIFICATE_HTMLBRANDING_STATIC_TEMPLATE_404BRANDING_STATIC_TEMPLATE_429BRANDING_STATIC_TEMPLATE_ABOUTBRANDING_STATIC_TEMPLATE_BLOGBRANDING_STATIC_TEMPLATE_CONTACTBRANDING_STATIC_TEMPLATE_DONATEBRANDING_STATIC_TEMPLATE_EMBARGOBRANDING_STATIC_TEMPLATE_FAQBRANDING_STATIC_TEMPLATE_HELPBRANDING_STATIC_TEMPLATE_HONORBRANDING_STATIC_TEMPLATE_JOBSBRANDING_STATIC_TEMPLATE_MEDIA_KITBRANDING_STATIC_TEMPLATE_NEWSBRANDING_STATIC_TEMPLATE_PRESSBRANDING_STATIC_TEMPLATE_PRIVACYBRANDING_STATIC_TEMPLATE_SERVER_DOWNBRANDING_STATIC_TEMPLATE_SERVER_ERRORBRANDING_STATIC_TEMPLATE_SERVER_OVERLOADEDBRANDING_STATIC_TEMPLATE_SITEMAPBRANDING_STATIC_TEMPLATE_TOS
Custom MFEs
You can still override or add MFEs with BRANDING_MFE.
Example:
BRANDING_MFE:
authn:
port: 2001
repository: https://github.com/myorg/myfork.git
version: mybranch
Repositories must end in .git, and custom MFEs must remain compatible with Tutor MFE build expectations.
Usage
tutor plugins enable branding
tutor images build openedx
tutor images build mfe
tutor local do init --limit branding
Notes:
tutor local do init --limit brandingis needed only if you are usingBRANDING_THEME_REPOS. This command associates the comprehensive theme directory to the site for legacy HTML pages.tutor images build openedxis needed only if you are usingBRANDING_THEME_REPOS.tutor images build mfeis needed only if you want the theme variant (light/dark/auto/...) switch.
For Kubernetes deployments, also push rebuilt images and restart the affected services.
License
This software is licensed under the terms of the AGPLv3.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tutor_contrib_branding-21.1.0.tar.gz.
File metadata
- Download URL: tutor_contrib_branding-21.1.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c61a289e365fc3a014a20d3d8abfb9c64313a801dad795423dc147ca7dcc6924
|
|
| MD5 |
3f911e2d7f06d73a1f63590f29ee4329
|
|
| BLAKE2b-256 |
4077c4d916575349e460d8991ed49be4b479b90ebf9aa503f82862901f1ca929
|
Provenance
The following attestation bundles were made for tutor_contrib_branding-21.1.0.tar.gz:
Publisher:
publish.yml on aulasneo/tutor-contrib-branding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tutor_contrib_branding-21.1.0.tar.gz -
Subject digest:
c61a289e365fc3a014a20d3d8abfb9c64313a801dad795423dc147ca7dcc6924 - Sigstore transparency entry: 1362921606
- Sigstore integration time:
-
Permalink:
aulasneo/tutor-contrib-branding@2ea93c4de85949612a8cd5dfcce1c12e243500fb -
Branch / Tag:
refs/tags/v21.1.0 - Owner: https://github.com/aulasneo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ea93c4de85949612a8cd5dfcce1c12e243500fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file tutor_contrib_branding-21.1.0-py3-none-any.whl.
File metadata
- Download URL: tutor_contrib_branding-21.1.0-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bb5123030db9659efac31370c12ff023e32c267a6f90d84763233ed8ffed878
|
|
| MD5 |
ad24b0778ae74b447e9e7f302ceba45b
|
|
| BLAKE2b-256 |
fae1550615cfb0441053cd52ffb12d6ca8815220dc9bbffb149a4089ecb759b7
|
Provenance
The following attestation bundles were made for tutor_contrib_branding-21.1.0-py3-none-any.whl:
Publisher:
publish.yml on aulasneo/tutor-contrib-branding
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tutor_contrib_branding-21.1.0-py3-none-any.whl -
Subject digest:
2bb5123030db9659efac31370c12ff023e32c267a6f90d84763233ed8ffed878 - Sigstore transparency entry: 1362921722
- Sigstore integration time:
-
Permalink:
aulasneo/tutor-contrib-branding@2ea93c4de85949612a8cd5dfcce1c12e243500fb -
Branch / Tag:
refs/tags/v21.1.0 - Owner: https://github.com/aulasneo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ea93c4de85949612a8cd5dfcce1c12e243500fb -
Trigger Event:
push
-
Statement type: