Defer loading other non-critical CSS

parent bf915296
Pipeline #51071568 (#83) passed with stages
in 1 minute and 29 seconds
......@@ -5,6 +5,5 @@
] %}
{% set css_files = css_files + [
'_static/css/prism.min.css',
'_static/css/style.min.css'
] %}
......@@ -46,9 +46,14 @@
{# RTD hosts this file, so just load on non RTD builds #}
{%- if not READTHEDOCS %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link href="{{ pathto('_static/' + style, 1) }}" rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link href="{{ pathto('_static/' + style, 1) }}" rel="stylesheet" type="text/css">
</noscript>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<noscript><link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"></noscript>
<link href="{{ pathto('_static/' + 'css/prism.min.css', 1) }}" rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link href="{{ pathto('_static/' + 'css/prism.min.css', 1) }}" rel="stylesheet" type="text/css">
</noscript>
<script>/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */
/* This file is meant as a standalone workflow for
- testing support for link[rel=preload]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment