refactor: improve js module loading order
This commit is contained in:
parent
e0950fc973
commit
b77767f76e
7 changed files with 16 additions and 17 deletions
|
@ -65,7 +65,7 @@
|
|||
{% endcase %}
|
||||
|
||||
{% capture script %}{{ js_dist }}{{ js }}.min.js{% endcapture %}
|
||||
<script defer src="{{ script | relative_url }}"></script>
|
||||
<script src="{{ script | relative_url }}"></script>
|
||||
|
||||
{% if page.math %}
|
||||
<!-- MathJax -->
|
||||
|
@ -88,6 +88,10 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.mermaid %}
|
||||
{% include mermaid.html %}
|
||||
{% endif %}
|
||||
|
||||
{% if jekyll.environment == 'production' %}
|
||||
<!-- PWA -->
|
||||
{% if site.pwa.enabled %}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { basic, initSidebar, initTopbar } from './modules/layouts';
|
||||
|
||||
basic();
|
||||
initSidebar();
|
||||
initTopbar();
|
||||
basic();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { basic, initSidebar, initTopbar } from './modules/layouts';
|
||||
import { initLocaleDatetime, loadImg } from './modules/plugins';
|
||||
|
||||
basic();
|
||||
loadImg();
|
||||
initLocaleDatetime();
|
||||
initSidebar();
|
||||
initTopbar();
|
||||
initLocaleDatetime();
|
||||
loadImg();
|
||||
basic();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { basic, initSidebar, initTopbar } from './modules/layouts';
|
||||
import { initLocaleDatetime } from './modules/plugins';
|
||||
|
||||
basic();
|
||||
initSidebar();
|
||||
initTopbar();
|
||||
initLocaleDatetime();
|
||||
basic();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { basic, initSidebar, initTopbar } from './modules/layouts';
|
||||
import { loadImg, imgPopup, initClipboard } from './modules/plugins';
|
||||
|
||||
basic();
|
||||
initSidebar();
|
||||
initTopbar();
|
||||
loadImg();
|
||||
imgPopup();
|
||||
initSidebar();
|
||||
initTopbar();
|
||||
initClipboard();
|
||||
basic();
|
||||
|
|
|
@ -7,11 +7,11 @@ import {
|
|||
toc
|
||||
} from './modules/plugins';
|
||||
|
||||
initSidebar();
|
||||
initTopbar();
|
||||
loadImg();
|
||||
toc();
|
||||
imgPopup();
|
||||
initSidebar();
|
||||
initLocaleDatetime();
|
||||
initClipboard();
|
||||
toc();
|
||||
initTopbar();
|
||||
basic();
|
||||
|
|
|
@ -75,13 +75,8 @@ layout: compress
|
|||
{% endif %}
|
||||
|
||||
<!-- JavaScripts -->
|
||||
|
||||
{% include js-selector.html lang=lang %}
|
||||
|
||||
{% if page.mermaid %}
|
||||
{% include mermaid.html %}
|
||||
{% endif %}
|
||||
|
||||
{% include_cached search-loader.html lang=lang %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue