Skip to content

Commit 877bbdb

Browse files
committed
docs: update README with usage instructions and troubleshooting
1 parent 70486f6 commit 877bbdb

File tree

1 file changed

+98
-1
lines changed

1 file changed

+98
-1
lines changed

plugins/tutor-contrib-paragon/README.rst

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ This structure is optimized for design token–based themes (see `Paragon Design
4444

4545
.. note::
4646

47-
Documentation for how to use extensions is not yet available.
4847
A link to the official Open edX or Paragon documentation will be added here once it is published.
4948

5049
Configuration
@@ -60,9 +59,107 @@ All configuration variables can be overridden via `tutor config save`:
6059
- theme-1
6160
- theme-2
6261
PARAGON_SERVE_COMPILED_THEMES: true
62+
PARAGON_BUILDER_IMAGE: "paragon-builder:latest"
6363
6464
You may customize paths or theme names to suit your deployment.
6565

66+
Usage
67+
*****
68+
69+
Prerequisites
70+
-------------
71+
72+
- A built Paragon CLI image:
73+
74+
.. code-block:: bash
75+
76+
tutor images build paragon-builder
77+
78+
- A theme source directory structured as follows:
79+
80+
.. code-block:: text
81+
82+
theme-sources/
83+
├── core/
84+
│ └── ... (token files)
85+
└── themes/
86+
├── light/ # example theme variant
87+
│ └── ... (light theme token files)
88+
└── dark/ # example theme variant
89+
└── ... (dark theme token files)
90+
91+
In this structure:
92+
93+
- The ``core/`` directory contains base design tokens common across all themes.
94+
- The ``themes/`` directory contains subdirectories for each theme variant (e.g., ``light``, ``dark``), each with tokens specific to that theme.
95+
96+
Building Themes
97+
---------------
98+
99+
Invoke the build process via Tutor:
100+
101+
.. code-block:: bash
102+
103+
tutor local do build-tokens [OPTIONS]
104+
105+
Available options:
106+
107+
- ``--source-tokens-only``
108+
Include only source design tokens in the build.
109+
110+
- ``--output-token-references``
111+
Include references for tokens with aliases to other tokens in the build output.
112+
113+
- ``--themes <theme1,theme2>``
114+
Comma-separated list of theme names to compile. Defaults to the list defined in ``PARAGON_ENABLED_THEMES`` if not provided.
115+
116+
- ``-v, --verbose``
117+
Enable verbose logging.
118+
119+
Examples
120+
--------
121+
122+
.. code-block:: bash
123+
124+
# Compile all themes listed in PARAGON_ENABLED_THEMES
125+
tutor local do build-tokens
126+
127+
# Compile only specific themes
128+
tutor local do build-tokens --themes theme-1,theme-2
129+
130+
# Compile with full debug logs
131+
tutor local do build-tokens --verbose
132+
133+
# Compile only source tokens for a single theme
134+
tutor local do build-tokens --themes theme-1 --source-tokens-only
135+
136+
Output
137+
------
138+
139+
Artifacts will be written to the directory specified by ``PARAGON_COMPILED_THEMES_PATH`` (default: ``env/plugins/paragon/compiled-themes``).
140+
141+
Troubleshooting
142+
***************
143+
144+
- **No custom themes built or only default tokens generated**
145+
Ensure that your custom theme directories exist under ``PARAGON_THEME_SOURCES_PATH`` and that their names exactly match those in ``PARAGON_ENABLED_THEMES`` or passed via ``--themes``. If no custom tokens are found, Paragon will fall back to its built-in defaults.
146+
147+
- **Themes are not picked up when using --themes:**
148+
The value for ``--themes`` must be a comma-separated list (no spaces), e.g. ``--themes theme-1,theme-2``.
149+
150+
- **Write permission denied**
151+
Verify that Docker and the Tutor process have write access to the path defined by ``PARAGON_COMPILED_THEMES_PATH``. Adjust filesystem permissions if necessary.
152+
153+
- **Error: "Expected at least 4 args"**
154+
This occurs when the build job is invoked directly inside the container. Always run via Tutor:
155+
156+
.. code-block:: bash
157+
158+
tutor local do build-tokens [OPTIONS]
159+
160+
- **Other issues**
161+
Re-run the build with ``--verbose`` to obtain detailed logs and identify misconfigurations or missing files.
162+
66163
License
67164
*******
68165

0 commit comments

Comments
 (0)