From 82a4452e6b932e3e7265dec5450c7938861779f6 Mon Sep 17 00:00:00 2001 From: Anirban Basu Date: Mon, 3 Oct 2022 02:51:29 +0900 Subject: [PATCH] feat: display more specific warning if theme variation doesn't exist (#2843) Based on the suggestion at https://discord.com/channels/722225264733716590/1024935456313450506/1025050134083543152 --- modules/wowchemy/layouts/partials/functions/parse_theme.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/wowchemy/layouts/partials/functions/parse_theme.html b/modules/wowchemy/layouts/partials/functions/parse_theme.html index 211f38db..8306d936 100644 --- a/modules/wowchemy/layouts/partials/functions/parse_theme.html +++ b/modules/wowchemy/layouts/partials/functions/parse_theme.html @@ -5,12 +5,12 @@ {{- $theme_night_index := (site.Params.appearance.theme_night | lower | replaceRE "\\s" "_") | default "minimal" -}} {{- if not (index (index site.Data.themes $theme_day_index) "light") -}} - {{- warnf "Theme `%s` not found at `data/themes/%s.toml`" site.Params.appearance.theme_day $theme_day_index -}} + {{- warnf "In `params.yaml`, you requested `theme_day: %s` but there is not a `light` style in `data/themes/%s.toml`. Falling back to default light style." site.Params.appearance.theme_day $theme_day_index -}} {{- $theme_day_index = "minimal" -}} {{ end }} {{- if not (index (index site.Data.themes $theme_night_index) "dark") -}} - {{- warnf "Theme `%s` not found at `data/themes/%s.toml`" site.Params.appearance.theme_night $theme_night_index -}} + {{- warnf "In `params.yaml`, you requested `theme_night: %s` but there is not a `dark` style in `data/themes/%s.toml`. Falling back to default dark style." site.Params.appearance.theme_night $theme_night_index -}} {{- $theme_night_index = "minimal" -}} {{ end }}