aboutsummaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-07-28 12:18:59 +0200
committerBjørn Erik Pedersen <[email protected]>2023-07-28 15:14:24 +0200
commitbec9b80d95d1be8270bcda080037c588614f3be1 (patch)
tree80e26516976a1aefc0c91090d05eccadf80badc2 /config
parent1c97095ac01d7fa9a3e879fa69f7b550c200b567 (diff)
downloadhugo-bec9b80d95d1be8270bcda080037c588614f3be1.tar.gz
hugo-bec9b80d95d1be8270bcda080037c588614f3be1.zip
Deprecate taxonomyTerm
In favour of 'taxonomy' Closes #11256
Diffstat (limited to 'config')
-rw-r--r--config/allconfig/allconfig.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/config/allconfig/allconfig.go b/config/allconfig/allconfig.go
index 00453fb6c..1c1b0b990 100644
--- a/config/allconfig/allconfig.go
+++ b/config/allconfig/allconfig.go
@@ -240,12 +240,13 @@ func (c *Config) CompileConfig(logger loggers.Logger) error {
disabledKinds := make(map[string]bool)
for _, kind := range c.DisableKinds {
kind = strings.ToLower(kind)
- if kind == "taxonomyterm" {
+ if newKind := kinds.IsDeprecatedAndReplacedWith(kind); newKind != "" {
+ logger.Deprecatef(false, "Kind %q used in disableKinds is deprecated, use %q instead.", kind, newKind)
// Legacy config.
- kind = "taxonomy"
+ kind = newKind
}
if kinds.GetKindAny(kind) == "" {
- logger.Warnf("Unknown kind %q in disableKinds", kind)
+ logger.Warnf("Unknown kind %q in disableKinds configuration.", kind)
continue
}
disabledKinds[kind] = true
@@ -254,9 +255,17 @@ func (c *Config) CompileConfig(logger loggers.Logger) error {
isRssDisabled := disabledKinds["rss"]
outputFormats := c.OutputFormats.Config
for kind, formats := range c.Outputs {
+ if newKind := kinds.IsDeprecatedAndReplacedWith(kind); newKind != "" {
+ logger.Deprecatef(false, "Kind %q used in outputs configuration is deprecated, use %q instead.", kind, newKind)
+ kind = newKind
+ }
if disabledKinds[kind] {
continue
}
+ if kinds.GetKindAny(kind) == "" {
+ logger.Warnf("Unknown kind %q in outputs configuration.", kind)
+ continue
+ }
for _, format := range formats {
if isRssDisabled && format == "rss" {
// Legacy config.