From 88787a33a7325e5444e0151c6a75558b0c514234 Mon Sep 17 00:00:00 2001 From: Ken Matsui <26405363+ken-matsui@users.noreply.github.com> Date: Sun, 14 Nov 2021 00:36:34 +0900 Subject: [PATCH] Move `scripts` on the rustdoc template into `head` and apply the `defer` attribute --- src/librustdoc/html/templates/page.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/librustdoc/html/templates/page.html b/src/librustdoc/html/templates/page.html index 9fafea69145..cf57d4cf3aa 100644 --- a/src/librustdoc/html/templates/page.html +++ b/src/librustdoc/html/templates/page.html @@ -20,6 +20,16 @@ > {#- -#} {#- -#} {#- -#} + {#- -#} + {%- for script in page.static_extra_scripts -%} + {#- -#} + {% endfor %} + {%- if layout.scrape_examples_extension -%} + {#- -#} + {%- endif -%} + {%- for script in page.extra_scripts -%} + {#- -#} + {% endfor %}