From 1a7cd97fb62a7637c9eae963003ce3d965ffe3f9 Mon Sep 17 00:00:00 2001 From: Anirban Basu Date: Fri, 30 Sep 2022 07:42:00 +0900 Subject: [PATCH 1/2] Updated warning messages to be more precise. 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 211f38dba..9081b648b 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 "Light specification for theme `%s` not found at `data/themes/%s.toml`, falling back to the light specification from the `minimal` theme." 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 "Dark specification for theme `%s` not found at `data/themes/%s.toml`, falling back to the dark specification from the `minimal` theme." site.Params.appearance.theme_night $theme_night_index -}} {{- $theme_night_index = "minimal" -}} {{ end }} From 67c11d7b9f39b0e268fb106d5fcc0bbddfec082b Mon Sep 17 00:00:00 2001 From: Geo Date: Sun, 2 Oct 2022 18:49:26 +0100 Subject: [PATCH 2/2] Update parse_theme.html --- 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 9081b648b..8306d9363 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 "Light specification for theme `%s` not found at `data/themes/%s.toml`, falling back to the light specification from the `minimal` theme." 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 "Dark specification for theme `%s` not found at `data/themes/%s.toml`, falling back to the dark specification from the `minimal` theme." 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 }}