diff --git a/docs/user-guide/styling-your-docs.md b/docs/user-guide/styling-your-docs.md index ffb8e08e..3c493d95 100644 --- a/docs/user-guide/styling-your-docs.md +++ b/docs/user-guide/styling-your-docs.md @@ -189,7 +189,8 @@ following blocks: * `site_meta`: Contains meta tags in the document head. * `htmltitle`: Contains the page title in the document head. * `styles`: Contains the link tags for stylesheets. -* `scripts`: Contains the JavaScript libraries included in the page. +* `libs`: Contains the JavaScript libraries (jQuery, etc) included in the page header. +* `scripts`: Contains JavaScript scripts which should execute after a page loads. * `analytics`: Contains the analytics script. * `extrahead`: An empty block in the `` to insert custom tags/scripts/etc. * `site_name`: Contains the site name in the navigation bar. diff --git a/mkdocs/themes/mkdocs/base.html b/mkdocs/themes/mkdocs/base.html index 843c3329..d99e7434 100644 --- a/mkdocs/themes/mkdocs/base.html +++ b/mkdocs/themes/mkdocs/base.html @@ -26,11 +26,17 @@ {%- endfor %} {%- endblock %} + {%- block libs %} + + + + + {%- endblock %} {%- block analytics %} {%- if google_analytics %} @@ -71,9 +77,6 @@ {%- block scripts %} - - - diff --git a/mkdocs/themes/readthedocs/base.html b/mkdocs/themes/readthedocs/base.html index 1d620a4f..600958f0 100644 --- a/mkdocs/themes/readthedocs/base.html +++ b/mkdocs/themes/readthedocs/base.html @@ -27,7 +27,7 @@ {%- endfor %} {%- endblock %} - {%- block scripts %} + {%- block libs %} {% if page %} - {%- endblock %} {%- block extrahead %} {% endblock %} - {%- for path in extra_javascript %} - - {%- endfor %} - {%- block analytics %} {% if google_analytics %} + {%- for path in extra_javascript %} + + {%- endfor %} + {%- endblock %}