You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/tutor-contrib-paragon/README.rst
+72-39Lines changed: 72 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,19 +52,29 @@ To use this plugin, ensure you're running compatible versions of Open edX and it
52
52
* **Open edX "Teak" release (Tutor >= 20)**
53
53
* **Tutor >= 20**
54
54
55
-
.. note::
55
+
**💡 Note:**
56
+
Design token functionality is available starting from Paragon v23 and the Open edX "Teak" release.
57
+
While the plugin is expected to support future versions (e.g., Tutor 21+), major releases may introduce breaking changes.
56
58
57
-
Design token functionality is available starting from Paragon version 23 and the Open edX "Teak" release (which corresponds to Tutor version 20). While the plugin is expected to support future versions (e.g., Tutor 21+), major releases may introduce breaking changes. Compatibility will be updated as needed.
58
59
59
-
.. warning::
60
60
61
-
As of now, the plugin's `pyproject.toml` specifies `tutor>=19.0.0,<21.0.0`. This constraint may be relaxed once upstream changes in `tutor-mfe` are released (see `overhangio/tutor-mfe#267 <https://github.com/overhangio/tutor-mfe/pull/267>`_ and `overhangio/tutor-mfe#264 <https://github.com/overhangio/tutor-mfe/pull/264>`_).
61
+
**⚠️ Warning:**
62
+
As of now, the plugin's `pyproject.toml` specifies:
63
+
64
+
::
65
+
66
+
tutor>=19.0.0,<21.0.0
67
+
68
+
This constraint may be relaxed once upstream changes in `tutor-mfe` are released:
A future version may be available via PyPI. For now, use the development installation method.
76
+
**💡 Note:**
77
+
A future version may be available via PyPI. For now, use the development installation method.
68
78
69
79
Development Install
70
80
-------------------
@@ -238,14 +248,18 @@ Ways to use shared base styles:
238
248
Option 1: Use jsDelivr CDN
239
249
--------------------------
240
250
241
-
You can configure your MFEs to load base Paragon styles directly from the jsDelivr CDN. This is often the simplest approach.
251
+
You can configure your MFEs to load base Paragon styles directly from the `jsDelivr CDN <https://www.jsdelivr.com/>`_. This is often the simplest approach.
252
+
253
+
Configure your MFE settings (likely via ``MFE_CONFIG`` in Tutor) to use the jsDelivr URL for the base styles. You can use the ``$paragonVersion`` wildcard to ensure the MFE loads the correct version dynamically.
254
+
255
+
* Example URL using the wildcard::
242
256
243
-
1. Determine the ``@openedx/paragon`` version used by your MFEs (e.g., by checking the MFE's ``package.json`` or running ``npm list @openedx/paragon`` within an MFE directory).
244
-
2. Configure your MFE settings (likely via ``MFE_CONFIG`` in Tutor) to use the jsDelivr URL for the base styles.
245
-
* Example URL: ``https://cdn.jsdelivr.net/npm/@openedx/[email protected]/dist/core.min.css``
246
-
* (Replace ``23.1.0`` with the actual version used by your MFEs).
Using jsDelivr involves loading resources from an external CDN. Consider network policies and data privacy requirements before implementing this approach.
250
264
251
265
Option 2: Host Your Own Base Styles
@@ -254,33 +268,52 @@ Option 2: Host Your Own Base Styles
254
268
You can host the base Paragon styles yourself using this plugin's static file hosting capability (via ``MFE_HOST_EXTRA_FILES``).
255
269
256
270
1. Obtain the base Paragon CSS file (typically ``core.min.css``) for the version(s) used by your MFEs.
257
-
2. Place the base CSS file(s) into your ``PARAGON_THEMES_PATH`` directory. A common structure might be:
258
-
.. code-block:: text
259
-
260
-
{{ TUTOR_ROOT }}/env/plugins/paragon/themes/
261
-
└── core/
262
-
└── 23.1.0/ # Use the actual Paragon version
263
-
└── core.min.css
264
-
265
-
3. Configure your MFEs to load the base styles from the plugin's static URL.
266
-
* Example URL (based on the structure above): ``http://<your-lms-domain>/static/paragon/themes/core/23.1.0/core.min.css``
267
-
* Replace ``<your-lms-domain>`` with your actual LMS domain (e.g., ``apps.local.openedx.io``).
268
-
* Update your MFE configuration (for example, by setting ``MFE_CONFIG["PARAGON_THEME_URLS"]`` in your Tutor settings) to point to this URL. **This URL must be placed under the ``"default"`` key within the ``"core"`` section.**
When hosting your own base styles, ensure the versions match those expected by your MFEs. Using a single, compatible version (e.g., the latest minor of the major version used) is often sufficient if you are using standard MFEs from the same Open edX release. For advanced configurations like version wildcards, refer to the `frontend-platform theming documentation <https://github.com/openedx/frontend-platform/blob/master/docs/how_tos/theming.md>`_.
271
+
272
+
**💡 Note:**
273
+
MFEs within the same Open edX release typically use the same major version of Paragon, but minor versions might differ. You can check the version for an MFE by inspecting its ``package.json`` file or running ``npm list @openedx/paragon`` within an MFE directory.
274
+
275
+
2. Place the base CSS file(s) into your ``PARAGON_THEMES_PATH`` directory. You have two main options for structuring this:
276
+
277
+
* **Host a single version:** If all your MFEs can use the same version (e.g., the latest minor of a major version like ``23.4.0``), place it once::
278
+
279
+
{{ TUTOR_ROOT }}/env/plugins/paragon/themes/
280
+
└── core/
281
+
└── 23.4.0/ # A single, chosen version
282
+
└── core.min.css
283
+
284
+
* **Host multiple versions:** To support MFEs using different Paragon versions, create a directory structure for each required version::
285
+
286
+
{{ TUTOR_ROOT }}/env/plugins/paragon/themes/
287
+
└── core/
288
+
├── 23.1.0/ # Version for MFE A
289
+
│ └── core.min.css
290
+
├── 23.4.0/ # Version for MFE B, C
291
+
│ └── core.min.css
292
+
└── ... (other versions as needed)
293
+
294
+
295
+
3. Configure your MFEs to load the base styles from the plugin's static URL.
296
+
297
+
* **Using a single version (Recommended):**
298
+
If you host only one version of the base styles, hardcode that version in the URL within your `MFE_CONFIG` settings.
Ensure all versions requested by your MFEs are present in your hosted directory structure.
314
+
315
+
**💡 Note:**
316
+
When hosting your own base styles, ensure the versions match those expected by your MFEs. Using a single, compatible version is often sufficient for standard MFEs from the same Open edX release. For advanced configurations like version wildcards, refer to the `frontend-platform theming documentation <https://github.com/openedx/frontend-platform/blob/master/docs/how_tos/theming.md>`_.
0 commit comments