diff --git a/README.rst b/README.rst index fb713e2..31e3f37 100644 --- a/README.rst +++ b/README.rst @@ -256,6 +256,12 @@ optional. files to be loaded. They will be referenced at the bottom of ``base.html``, after any default script files. +``CDN_DICT`` + Allows to override the CDNs for the used JS libraries. The dictionary + must include the keys bootstrap, jquery and awesome. It defaults to + the cdnjs.com public CDN because that CDN provides all the libraries, + is popular and supports IPv6. + ``ARCHIVES_URL`` URL of archives page. Default is ``archives.html``. If you're modifying ``ARCHIVES_SAVE_AS`` in your pelicanconf.py then you'll probably need to diff --git a/templates/base.html b/templates/base.html index 9e6689d..2bff345 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,5 +1,12 @@ + {% if not CDN_DICT %} + {% set CDN_DICT = { + 'bootstrap': 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap', + 'jquery' : 'https://cdnjs.cloudflare.com/ajax/libs/jquery', + 'awesome' : 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome', + } %} + {% endif %}
@@ -33,12 +40,12 @@ {% else %} {% endif %} {% endif %} @@ -54,11 +61,6 @@ {% endfor %} - - {% if CUSTOM_HTML_HEAD %} {% include "includes/" + CUSTOM_HTML_HEAD %} @@ -182,8 +184,8 @@ {% if not SKIP_DEFAULT_JS %} - - + {% endif %}