|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
import mediumZoom from './_vendor/medium-zoom.esm';
|
|
|
import {hugoEnvironment, codeHighlighting, searchEnabled} from '@params';
|
|
|
-import {fixMermaid, scrollParentToChild} from './wowchemy-utils';
|
|
|
+import {scrollParentToChild} from './wowchemy-utils';
|
|
|
import {
|
|
|
changeThemeModeClick,
|
|
|
initThemeVariation,
|
|
@@ -423,7 +423,10 @@ function getSiblings(elem) {
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
fixHugoOutput();
|
|
|
- fixMermaid();
|
|
|
+
|
|
|
+ // Render theme variation, including any HLJS and Mermaid themes.
|
|
|
+ let {isDarkTheme, themeMode} = initThemeVariation();
|
|
|
+ renderThemeVariation(isDarkTheme, themeMode, true);
|
|
|
|
|
|
// Initialise code highlighting if enabled for this page.
|
|
|
// Note: this block should be processed after the Mermaid code-->div conversion.
|
|
@@ -431,10 +434,6 @@ $(document).ready(function () {
|
|
|
hljs.initHighlighting();
|
|
|
}
|
|
|
|
|
|
- // Render theme variation, including any HLJS and Mermaid themes.
|
|
|
- let {isDarkTheme, themeMode} = initThemeVariation();
|
|
|
- renderThemeVariation(isDarkTheme, themeMode, true);
|
|
|
-
|
|
|
// Scroll Book page's active menu sidebar link into view.
|
|
|
let child = document.querySelector('.docs-links .active');
|
|
|
let parent = document.querySelector('.docs-links');
|