From ccf52aba495164a09b0b1327ff211402ab0ab2f6 Mon Sep 17 00:00:00 2001 From: Sofiane Bebert Date: Wed, 10 Nov 2021 19:38:28 +0000 Subject: [PATCH] docs: add instructions to customise MFE logos --- README.rst | 21 +++++++++ .../templates/mfe/build/mfe/env/production | 43 +++++++++---------- 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/README.rst b/README.rst index 93b6d39b..8af00869 100644 --- a/README.rst +++ b/README.rst @@ -112,6 +112,27 @@ This plugin makes it possible to change existing and add new translation strings Your custom translation strings should now appear in your app. +Customise MFEs Logos +~~~~~~~~~~~~~~~~~~~~~~~~~ + +To change the MFEs logos from the default to your own logos, override the corresponding settings in the MFEs environment using patches `mfe-env-production` and `mfe-env-development`. For example +:: + + name: mfe_branding_plugin + version: 0.1.0 + patches: + mfe-env-development: | + LOGO_URL=/logo.svg + LOGO_TRADEMARK_URL=/logo-trademark.svg + LOGO_WHITE_URL=/logo-white.svg + FAVICON_URL=/favicon.ico + mfe-env-production: | + LOGO_URL=/logo.svg + LOGO_TRADEMARK_URL=/logo-trademark.svg + LOGO_WHITE_URL=/logo-white.svg + FAVICON_URL=/favicon.ico + + Running MFEs on Kubernetes -------------------------- diff --git a/tutormfe/templates/mfe/build/mfe/env/production b/tutormfe/templates/mfe/build/mfe/env/production index 527b3179..2033f134 100644 --- a/tutormfe/templates/mfe/build/mfe/env/production +++ b/tutormfe/templates/mfe/build/mfe/env/production @@ -1,25 +1,24 @@ -{# -https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html#configuration-with-environment-variables -#} ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload' BASE_URL='{{ - MFE_HOST -}}' CSRF_TOKEN_API_PATH='/csrf/api/v1/token' CREDENTIALS_BASE_URL='' -DISCOVERY_API_BASE_URL='{% if DISCOVERY_HOST is defined %}{{ "https" if ENABLE_HTTPS else "http" -}}://{{ DISCOVERY_HOST }}{% endif %}' ECOMMERCE_BASE_URL='' FAVICON_URL='{% if -ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/favicon.ico' -LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference' LMS_BASE_URL='{% -if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}' LOGIN_URL='{% -if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/login' -LOGO_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ - LMS_HOST -}}/static/images/logo.png' LOGO_TRADEMARK_URL='{% if ENABLE_HTTPS %}https{% else -%}http{% endif %}://{{ LMS_HOST }}/static/images/logo.png' LOGO_WHITE_URL='' -LOGOUT_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ - LMS_HOST -}}/logout' MARKETING_SITE_BASE_URL='{% if ENABLE_HTTPS %}https{% else %}http{% -endif %}://{{ LMS_HOST }}' NODE_ENV=production PUBLISHER_BASE_URL='' -REFRESH_ACCESS_TOKEN_ENDPOINT='{{ "https" if ENABLE_HTTPS else "http" }}://{{ - LMS_HOST -}}/login_refresh' SEGMENT_KEY='' SITE_NAME='{{ PLATFORM_NAME }}' +{# https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html#configuration-with-environment-variables #} +ACCESS_TOKEN_COOKIE_NAME='edx-jwt-cookie-header-payload' +BASE_URL='{{ MFE_HOST }}' +CSRF_TOKEN_API_PATH='/csrf/api/v1/token' +CREDENTIALS_BASE_URL='' +DISCOVERY_API_BASE_URL='{% if DISCOVERY_HOST is defined %}{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}{% endif %}' +ECOMMERCE_BASE_URL='' +FAVICON_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/favicon.ico' +LANGUAGE_PREFERENCE_COOKIE_NAME='openedx-language-preference' +LMS_BASE_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}' +LOGIN_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/login' +LOGO_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/static/images/logo.png' +LOGO_TRADEMARK_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/static/images/logo.png' +LOGO_WHITE_URL='' +LOGOUT_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/logout' +MARKETING_SITE_BASE_URL='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}' +NODE_ENV=production +PUBLISHER_BASE_URL='' +REFRESH_ACCESS_TOKEN_ENDPOINT='{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/login_refresh' +SEGMENT_KEY='' +SITE_NAME='{{ PLATFORM_NAME }}' STUDIO_BASE_URL='{{ "https" if ENABLE_HTTPS else "http" }}://{{ CMS_HOST }}' USER_INFO_COOKIE_NAME='user-info'