Skip to content

Commit 7fa9335

Browse files
authored
Merge pull request #1867 from roland-ruedenauer/document_theme_paths
Document use of THEME_PATHS in moin wiki (#1848)
2 parents 8991004 + fc27aba commit 7fa9335

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/admin/configure.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,14 @@ name is the name of your theme. Note the directory structure under the other exi
493493
themes. Copy an `info.json` file to your theme directory and edit as needed.
494494
Create a file named theme.css in the src/moin/themes/<theme name>/static/css/ directory.
495495

496+
MoinMoin uses `Flask-theme <https://pypi.org/project/flask-theme/>`_ for loading themes.
497+
As mentioned in the `theme loader section <https://flask-theme.readthedocs.io/en/latest/#theme-loaders>`_,
498+
you can configure additional directories that Flask-theme searches for themes by setting
499+
the THEME_PATHS configuration.
500+
Here is an example how you would set THEME_PATHS in wikiconfig::
501+
502+
THEME_PATHS = os.path.join(Config.instance_dir, "themes")
503+
496504
To change the layout of the theme header, sidebar and footer, create a templates/ directory and
497505
copy and modify the files layout.html and show.html from either src/moin/templates/ or one
498506
of the existing theme templates directories.

src/moin/config/wikiconfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,4 @@ class Config(DefaultConfig):
281281
# config for flask-cache:
282282
# CACHE_TYPE = 'filesystem'
283283
# CACHE_DIR = '/path/to/flask-cache-dir'
284+
# THEME_PATHS = os.path.join(Config.instance_dir, "themes")

0 commit comments

Comments
 (0)