switched async to defer; only load search js if search enabled
This commit is contained in:
parent
0a749bb620
commit
e5b09a5d60
1 changed files with 18 additions and 23 deletions
|
@ -6,41 +6,38 @@
|
|||
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=utf-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
|
||||
<!-- Enable responsiveness on mobile devices-->
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
|
||||
<title>
|
||||
{% block title %}{{ config.title }}{% endblock title %}
|
||||
</title>
|
||||
|
||||
{% if config.extra.zulma_theme %}
|
||||
<link rel="preload" as="style"
|
||||
href="{{ get_url(path=config.extra.zulma_theme ~ ".css", trailing_slash=false) }}" />
|
||||
<link rel="preload" as="style" href="{{ get_url(path=config.extra.zulma_theme ~ ".css", trailing_slash=false) }}" />
|
||||
{% else %}
|
||||
<link rel="preload" as="style"
|
||||
href="{{ get_url(path="default.css", trailing_slash=false) }}" />
|
||||
<link rel="preload" as="style" href="{{ get_url(path="default.css", trailing_slash=false) }}" />
|
||||
{% endif %}
|
||||
|
||||
{% if config.generate_rss %}
|
||||
<link rel="alternate" type="application/rss+xml"
|
||||
title="RSS"
|
||||
href="{{ get_url(path="rss.xml") | safe }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="rss.xml") | safe }}">
|
||||
{% endif %}
|
||||
|
||||
{% block css %}
|
||||
{% if config.extra.zulma_theme %}
|
||||
<link rel="stylesheet"
|
||||
href="{{ get_url(path=config.extra.zulma_theme ~ ".css", trailing_slash=false) }}" />
|
||||
<link rel="stylesheet" href="{{ get_url(path=config.extra.zulma_theme ~ ".css", trailing_slash=false) }}" />
|
||||
{% else %}
|
||||
<link rel="stylesheet"
|
||||
href="{{ get_url(path="default.css", trailing_slash=false) }}" />
|
||||
<link rel="stylesheet" href="{{ get_url(path="default.css", trailing_slash=false) }}" />
|
||||
{% endif %}
|
||||
{% endblock css %}
|
||||
|
||||
{% if config.build_search_index %}
|
||||
<script defer type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") }}"></script>
|
||||
<script defer type="text/javascript" src="{{ get_url(path="search_index.en.js") }}"></script>
|
||||
{% endif }
|
||||
|
||||
{% block extra_head %}
|
||||
{% endblock extra_head %}
|
||||
|
||||
|
@ -86,14 +83,12 @@
|
|||
</div>
|
||||
</main>
|
||||
{% endblock content %}
|
||||
<script async type="text/javascript"
|
||||
src="{{ get_url(path="elasticlunr.min.js") }}"></script>
|
||||
<script async type="text/javascript"
|
||||
src="{{ get_url(path="search_index.en.js") }}"></script>
|
||||
<script async type="text/javascript"
|
||||
src="{{ get_url(path="js/bulma.js") }}"></script>
|
||||
<script async type="text/javascript"
|
||||
src="{{ get_url(path="js/search.js") }}"></script>
|
||||
|
||||
<script type="text/javascript" src="{{ get_url(path="js/bulma.js") }}"></script>
|
||||
|
||||
{% if config.build_search_index %}
|
||||
<script type="text/javascript" src="{{ get_url(path="js/search.js") }}"></script>
|
||||
{% endif %}
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Reference in a new issue