Allow providing JavaScript assets for generated website

Fixes #64, #65

Now users who wish to use Bootstrap dynamic elements (like dropdown menus)
can enable JavaScript either by including required scripts into their
static assets or by referencing their CDN URLs.

By default Alchemy uses no JavaScript - that has not changed.
main
Vitaly Potyarkin 2019-10-18 18:08:37 +03:00
parent e11ebff22e
commit 89dbba7a42
2 changed files with 7 additions and 0 deletions

View File

@ -123,6 +123,9 @@ Visit the [Settings wiki](https://github.com/nairobilug/pelican-alchemy/wiki/Set
- **RFG_FAVICONS**: Use a Favicon Generator package.
- **THEME_CSS_OVERRIDES**: Sequence of stylesheet URLs to override CSS provided by theme.
Both relative and absolute URLs are supported.
- **THEME_JS_OVERRIDES**: Sequence of JavaScript URLs to enable with this
theme. Alchemy uses no JS by default. Both relative and absolute URLs are
supported.
Misc settings:

View File

@ -59,6 +59,10 @@
{% include 'include/footer.html' %}
</div>
</footer>
{% for script in THEME_JS_OVERRIDES or () %}
<script type="text/javascript" src="{{ url(script) }}" crossorigin="anonymous"></script>
{% endfor %}
</body>
</html>