Browse Source

fix: page flickers when user's dark/light pref differs to theme's default

Fixes typo calling canChangeTheme().

Fix eb8748ff17996f04ee8a472ad997a2d4ae9410f6
Fix #1601
George Cushen 4 years ago
parent
commit
e034f7782e

+ 1 - 1
assets/js/load-theme.js

@@ -9,7 +9,7 @@
   }
 
   function initThemeVariation() {
-    if (!canChangeTheme) {
+    if (!canChangeTheme()) {
       return;
     }
 

+ 2 - 2
exampleSite/config/_default/params.toml

@@ -16,7 +16,7 @@
 theme = "minimal"
 
 # Enable users to switch between day and night mode?
-day_night = true
+day_night = false
 
 # Override the theme's font set (optional).
 #   Latest font sets (may require updating): https://sourcethemes.com/academic/themes/
@@ -57,7 +57,7 @@ description = ""
 # Enable source code highlighting? true/false
 # Documentation: https://sourcethemes.com/academic/docs/writing-markdown-latex/#highlighting-options
 highlight = true
-highlight_languages = ["r"]  # Add support for highlighting additional languages
+highlight_languages = ["r", "latex"]  # Add support for highlighting additional languages
 # highlight_style = "github"  # For supported styles, see https://cdnjs.com/libraries/highlight.js/
 
 # Enable LaTeX math rendering? true/false

+ 2 - 2
exampleSite/content/post/writing-technical-content/index.md

@@ -54,7 +54,7 @@ To render *inline* or *block* math, wrap your LaTeX math with `$...$` or `$$...$
 
 Example **math block**:
 
-```tex
+```latex
 $$\gamma_{n} = \frac{ 
 \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T 
 \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}
@@ -69,7 +69,7 @@ Example **inline math** `$\nabla F(\mathbf{x}_{n})$` renders as $\nabla F(\mathb
 
 Example **multi-line math** using the `\\\\` math linebreak:
 
-```tex
+```latex
 $$f(k;p_0^*) = \begin{cases} p_0^* & \text{if }k=1, \\\\
 1-p_0^* & \text {if }k=0.\end{cases}$$
 ```