diff --git a/README.md b/README.md index 7a943c7..511f17f 100644 --- a/README.md +++ b/README.md @@ -245,6 +245,21 @@ EXTRA_PATH_METADATA = { } ``` +CSS files can also be prevented from being included in the base template by +adding and an `exclude` key-value pair. For example, in your `pelicanconf.py`: + +```python +# Static files +STATIC_PATHS = [ + 'extra', + ... +] +EXTRA_PATH_METADATA = { + 'extra/custom.css': {'path': 'custom.css', 'exclude': True}, + ... +} +``` + In use ------ diff --git a/bulrush/templates/base.html b/bulrush/templates/base.html index db1d247..34d02c4 100644 --- a/bulrush/templates/base.html +++ b/bulrush/templates/base.html @@ -11,7 +11,7 @@ {% endassets %} {% for extra_path in EXTRA_PATH_METADATA.values() %} - {% if extra_path.get('path', '').endswith('.css') %} + {% if extra_path.get('path', '').endswith('.css') and not extra_path.get('exclude', False) %} {% endif %} {% endfor %}