From 394a018e087a9b12b74fea4f9e114a06eeefc822 Mon Sep 17 00:00:00 2001 From: Wen Junhua Date: Sun, 12 Nov 2023 19:09:16 +0800 Subject: [PATCH] feat: add warning when config is incorrect --- exampleSite/config/_default/languages.en.toml | 1 - layouts/partials/functions/warnings.html | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/exampleSite/config/_default/languages.en.toml b/exampleSite/config/_default/languages.en.toml index e0a1c63b..a9d0adf5 100644 --- a/exampleSite/config/_default/languages.en.toml +++ b/exampleSite/config/_default/languages.en.toml @@ -11,4 +11,3 @@ copyright = "© 2023 Congo contributors" mainSections = ["samples"] description = "A powerful, lightweight theme for Hugo built with Tailwind CSS." - diff --git a/layouts/partials/functions/warnings.html b/layouts/partials/functions/warnings.html index d7cb6178..e96ab7c3 100644 --- a/layouts/partials/functions/warnings.html +++ b/layouts/partials/functions/warnings.html @@ -7,3 +7,6 @@ {{ if ne .Params.logo nil }} {{ warnf "[CONGO] Theme parameter `logo` has been renamed to `header.logo`. Please update your site configuration." }} {{ end }} +{{ if .Author }} + {{ warnf "[CONGO] Theme parameter `.Site.author` in `languages.xx.toml` has been renamed to `.Site.Params.author` in `params.toml`. Please update your site configuration." }} +{{ end }}