Skip to content

Commit 951ae92

Browse files
authored
Fix default highlighting (alshedivat#931)
The default setting `media="none"` disables code highlighting. This works OK when we have `enable_darkmode: true` in `config.yml` as the code handling the dark/light theme switching takes care of setting `media=""` for the preferred theme. However, setting `enable_darkmode: false` prevents importing `theme.js` which in turn prevents said change thus the default highlighting stays disabled. Setting `media=""` by default enables the default highlighting when `enable_darkmode` is false. Fixes alshedivat#929
1 parent 30512ee commit 951ae92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_includes/head.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">
1212

1313
<!-- Code Syntax Highlighting -->
14-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/{{ site.highlight_theme_light | append: '.css' }}" media="none" id="highlight_theme_light" />
14+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/{{ site.highlight_theme_light | append: '.css' }}" media="" id="highlight_theme_light" />
1515

1616
<!-- Styles -->
1717
{% if site.icon.size < 3 %}

0 commit comments

Comments
 (0)