Skip to content

Commit 7348b74

Browse files
Merge pull request #5703 from xenserver-next/enable-auto-dark-mode-and-print
Hugo docs: Add dark mode support, theme variant selector and print
2 parents b3bba59 + fa8a661 commit 7348b74

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/hugo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Hugo
1717
uses: peaceiris/actions-hugo@v3
1818
with:
19-
hugo-version: '0.119.0'
19+
hugo-version: '0.127.0'
2020

2121
- name: Build
2222
run: |

doc/hugo.toml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,32 @@ assetsDir = "assets"
99
[[module.imports]]
1010
path = 'github.com/McShelby/hugo-theme-relearn'
1111

12+
# The latest upstream version of hugo-theme-relearn needs hugo 0.121.0:
13+
# https://mcshelby.github.io/hugo-theme-relearn/basics/requirements/index.html
14+
[module.hugoVersion]
15+
min = "0.121.0"
16+
1217
[outputs]
13-
home = [ "HTML", "RSS", "SEARCH"]
18+
# Home and section pages should also have a print icon for the print view:
19+
home = [ "HTML", "RSS", "SEARCH", "PRINT"]
20+
section = [ "HTML", "RSS", "PRINT"]
1421

1522
[params]
16-
themeVariant = "red"
23+
# Enable the theme variant selector, default to auto:
24+
themeVariant = [
25+
"auto",
26+
"zen-light",
27+
"zen-dark",
28+
"red",
29+
"blue",
30+
"green",
31+
"learn",
32+
"neon",
33+
"relearn-light",
34+
"relearn-bright",
35+
"relearn-dark"
36+
]
37+
# auto switches between "red" and "zen-dark" depending on the browser/OS dark mode:
38+
themeVariantAuto = ["red", "zen-dark"]
1739
alwaysopen = false
1840
collapsibleMenu = true

0 commit comments

Comments
 (0)