diff --git a/README.rst b/README.rst index 2422e21..4bde2bc 100644 --- a/README.rst +++ b/README.rst @@ -18,6 +18,56 @@ This is the Catalog micro-frontend application, currently under development. These are public-facing pages intended for unauthenticated users. The goal is to replace legacy views in ``edx-platform`` with modern, React and Paragon-based implementations. +Installing +********** + +As of the `Open edX Ulmo release `_, +this MFE can be installed and configured to replace the legacy Home, Course About, and Course Catalog pages. + +This involves + +* Hosting the MFE bundle +* Setting ``CATALOG_MICROFRONTEND_URL`` +* Setting ``ENABLE_CATALOG_MICROFRONTEND`` to ``True`` + +Installing in Tutor +=================== + +The following Tutor plugin code can be used to install and configure this MFE in a Tutor environment. + +.. code-block:: python3 + + from tutormfe.hooks import MFE_APPS + from tutor import hooks + + @MFE_APPS.add() + def _add_catalog_mfe(mfes): + mfes["catalog"] = { + "repository": "https://github.com/openedx/frontend-app-catalog.git", + "port": 1998, + "version": "master", # optional, will default to the Open edX current tag. + } + return mfes + + catalog_mfe_url = """ + CATALOG_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ get_mfe('catalog').port }}/catalog" + """ + + env_items = [ + ( + "openedx-common-settings", + catalog_mfe_url, + ), + ( + "openedx-lms-common-settings", + "ENABLE_CATALOG_MICROFRONTEND = True", + ), + ] + + for item in env_items: + hooks.Filters.ENV_PATCHES.add_item(item) + + Getting Started ***************