|
16 | 16 | > * **Open edX "Teak" release or later (Tutor >= 20)** |
17 | 17 | > * **Tutor >= 20** |
18 | 18 |
|
19 | | -### Configure `tutor` to use this theme |
| 19 | +## TODO |
20 | 20 |
|
21 | | -#### Using the [`jsdelivr`](https://www.jsdelivr.com/) CDN (Recommended) |
22 | | - |
23 | | -1. Stop `tutor` (`tutor dev stop` or `tutor local stop`) |
24 | | -2. Navigate to your local tutor plugins directory (`tutor plugins printroot`) |
25 | | -3. Create a new `sample-jsdelivr.py` plugin file with the following content |
26 | | - |
27 | | -```py |
28 | | -import json |
29 | | -from tutor import hooks |
30 | | - |
31 | | -paragon_theme_urls = { |
32 | | - "variants": { |
33 | | - "light": { |
34 | | - "urls": { |
35 | | - "default": "https://cdn.jsdelivr.net/npm/@openedx/paragon@$paragonVersion/dist/light.min.css", |
36 | | - "brandOverride": "https://cdn.jsdelivr.net/gh/openedx/sample-plugin@main/brand-sample/dist/light.min.css" |
37 | | - } |
38 | | - } |
39 | | - } |
40 | | -} |
41 | | - |
42 | | -fstring = f""" |
43 | | -MFE_CONFIG["PARAGON_THEME_URLS"] = {json.dumps(paragon_theme_urls)} |
44 | | -""" |
45 | | - |
46 | | -hooks.Filters.ENV_PATCHES.add_item( |
47 | | - ( |
48 | | - "mfe-lms-common-settings", |
49 | | - fstring |
50 | | - ) |
51 | | -) |
52 | | -``` |
53 | | - |
54 | | -4. Enable the plugin (`tutor plugins enable sample-jsdelivr`) |
55 | | -5. Start `tutor` (`tutor dev start lms cms mfe` or `tutor local start lms cms mfe`) |
56 | | - |
57 | | -#### Using the [Tutor Paragon Plugin](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon) (Recommended) |
58 | | - |
59 | | -1. [Install](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#installation) and [enable](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#enable-the-plugin) the Tutor Paragon Plugin (`tutor-contrib-paragon`) |
60 | | -2. [Build](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#build-the-paragon-image) the `paragon-builder` image. |
61 | | -2. Navigate to your Tutor config directory (you can find this by running `tutor config printroot`) |
62 | | -3. From your config directory, navigate to `env/plugins/paragon` (the full path on my dev machine is `~/.local/share/tutor-main/env/plugins/paragon`) |
63 | | -4. You should see some directories in there, find the `theme-sources` directory. |
64 | | -5. Place this theme's [`color.json` file](./src/tokens/src/themes/light/global/color.json) in the appropriate subdirectory of the `theme-sources` directory. |
65 | | -```sh |
66 | | -$ tree ~/.local/share/tutor-main/env/plugins/paragon |
67 | | -├── [...] |
68 | | -└── theme-sources |
69 | | - └── themes |
70 | | - └── light |
71 | | - └── global |
72 | | - └── color.json |
73 | | -``` |
74 | | -6. [Build](https://github.com/openedx/openedx-tutor-plugins/tree/main/plugins/tutor-contrib-paragon#build-all-themes) the theme |
75 | | -7. Start `tutor` (`tutor dev start lms cms mfe` or `tutor local start lms cms mfe`) |
| 21 | +Update this readme now that most of the instructions were moved into plugin.py |
0 commit comments