Skip to content

Commit

Permalink
docs: add instructions to customise MFE logos
Browse files Browse the repository at this point in the history
  • Loading branch information
BbrSofiane committed Nov 10, 2021
1 parent 75da11e commit ccf52ab
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 22 deletions.
21 changes: 21 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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=<URL>/logo.svg
LOGO_TRADEMARK_URL=<URL>/logo-trademark.svg
LOGO_WHITE_URL=<URL>/logo-white.svg
FAVICON_URL=<URL>/favicon.ico
mfe-env-production: |
LOGO_URL=<URL>/logo.svg
LOGO_TRADEMARK_URL=<URL>/logo-trademark.svg
LOGO_WHITE_URL=<URL>/logo-white.svg
FAVICON_URL=<URL>/favicon.ico


Running MFEs on Kubernetes
--------------------------

Expand Down
43 changes: 21 additions & 22 deletions tutormfe/templates/mfe/build/mfe/env/production
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit ccf52ab

Please sign in to comment.