mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 00:14:05 +00:00
fix: case when font and color themes not found even when present
See #1118
This commit is contained in:
1 parent
c2455378cc
commit
a71297bbfd
1 file changed
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
{{/* Attempt to load font style specified by user. */}}
|
||||
{{- $font_index := site.Params.font | default "default" -}}
|
||||
{{ if isset site.Data.fonts $font_index }}
|
||||
{{ if (index site.Data.fonts $font_index) }}
|
||||
{{- $font := index site.Data.fonts $font_index -}}
|
||||
{{- $scr.Set "google_fonts" $font.google_fonts -}}
|
||||
{{- $scr.Set "body_font" $font.body_font -}}
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
{{/* Attempt to load color theme specified by user. */}}
|
||||
{{- $theme_index := site.Params.color_theme | default "default" -}}
|
||||
{{ if isset site.Data.themes $theme_index }}
|
||||
{{ if (index site.Data.themes $theme_index) }}
|
||||
{{ $theme := index site.Data.themes $theme_index }}
|
||||
|
||||
{{- $scr.Set "light" ($theme.light | default true) -}}
|
||||
|
||||
Reference in new issue
Block a user