mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add THEME_TEMPLATE_OVERRIDES. Refs 2021
Allow for overriding individual templates from the theme by configuring the Jinja2 `Environment` loader to search for templates in the `THEME_TEMPLATE_OVERRIDES` path before the theme's `templates/` directory.
This commit is contained in:
parent
98d1d4e338
commit
a8555ef976
7 changed files with 49 additions and 0 deletions
|
|
@ -700,6 +700,14 @@ Template pages
|
|||
separate templates from the theme. Example: projects, resume, profile ...
|
||||
These templates need to use ``DIRECT_TEMPLATES`` setting.
|
||||
|
||||
.. data:: THEME_TEMPLATE_OVERRIDES = []
|
||||
|
||||
A list of paths you want Jinja2 to search for templates before searching the
|
||||
theme's ``templates/`` directory. Allows for overriding individual theme
|
||||
template files without having to fork an existing theme. Jinja2 searches in
|
||||
the following order: files in ``THEME_TEMPLATE_OVERRIDES`` first, theme's
|
||||
``templates/``
|
||||
|
||||
|
||||
Metadata
|
||||
========
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue