{"id":"f0544cf9cb5e2407","repo":"gohugoio/hugo","slug":"permalinks-configuration-not-supported-for-kind-q","errorCode":null,"errorMessage":"permalinks configuration not supported for kind %q, supported kinds are %v","messagePattern":"permalinks configuration not supported for kind %q, supported kinds are (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"resources/page/permalinks.go","lineNumber":583,"sourceCode":"\tvar configs PermalinksConfig\n\tconfig := hmaps.CleanConfigStringMap(m)\n\n\tfor k, v := range config {\n\t\tswitch v := v.(type) {\n\t\tcase string:\n\t\t\t// [permalinks]\n\t\t\t//   key = '...'\n\t\t\t// Backward compat: set for both page and term.\n\t\t\tconfigs = append(configs,\n\t\t\t\tPermalinkConfig{Target: PageMatcher{Kind: kinds.KindPage, Path: sectionToPathGlob(k)}, Pattern: v},\n\t\t\t\tPermalinkConfig{Target: PageMatcher{Kind: kinds.KindTerm, Path: sectionToPathGlob(k)}, Pattern: v},\n\t\t\t)\n\n\t\tcase hmaps.Params:\n\t\t\t// [permalinks.kind]\n\t\t\t//   section = '...'\n\t\t\tif !hstrings.InSlice(permalinksKindsSupport, k) {\n\t\t\t\treturn nil, fmt.Errorf(\"permalinks configuration not supported for kind %q, supported kinds are %v\", k, permalinksKindsSupport)\n\t\t\t}\n\t\t\tfor k2, v2 := range v {\n\t\t\t\tswitch v2 := v2.(type) {\n\t\t\t\tcase string:\n\t\t\t\t\tconfigs = append(configs,\n\t\t\t\t\t\tPermalinkConfig{Target: PageMatcher{Kind: k, Path: sectionToPathGlob(k2)}, Pattern: v2},\n\t\t\t\t\t)\n\t\t\t\tdefault:\n\t\t\t\t\treturn nil, fmt.Errorf(\"permalinks configuration invalid: unknown value %q for key %q for kind %q\", v2, k2, k)\n\t\t\t\t}\n\t\t\t}\n\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"permalinks configuration invalid: unknown value %q for key %q\", v, k)\n\t\t}\n\t}\n\treturn configs, nil\n}","sourceCodeStart":565,"sourceCodeEnd":601,"githubUrl":"https://github.com/gohugoio/hugo/blob/8a468df065a75c1c7cf9f6850f32148746590ea5/resources/page/permalinks.go#L565-L601","documentation":"The legacy nested map form `[permalinks.<kind>]` only supports the page kinds page, home, section, taxonomy, and term (permalinksKindsSupport). decodePermalinksMap raises this error when the second-level key is a map but its name is not one of those kinds, listing the supported values. It prevents silently ignoring permalink rules that could never match.","triggerScenarios":"Config like `[permalinks.posts.subsection]` or `[permalinks.pages]` — any `[permalinks.X]` table where X is not page/home/section/taxonomy/term; e.g. using a section name as the kind level with a nested table under it.","commonSituations":"Confusing the kind-scoped format (`[permalinks.page]`) with the simple section format (`[permalinks]\\nposts = ...`); typos like `sections` or `terms` (plural); older docs/examples using taxonomy names as nested tables.","solutions":["Use one of the supported kinds: `[permalinks.page]`, `[permalinks.section]`, `[permalinks.term]`, `[permalinks.taxonomy]`, `[permalinks.home]`.","If you meant a content section, put it as a key directly under `[permalinks]` with a string value: `posts = '/:year/:slug/'`.","Fix plural/typo kind names (e.g. `terms` → `term`)."],"exampleFix":"# before\n[permalinks.posts]\ntutorials = \"/:year/:slug/\"\n\n# after\n[permalinks.page]\nposts = \"/:year/:slug/\"","handlingStrategy":"validation","validationCode":"supported := map[string]bool{\"page\": true, \"section\": true, \"taxonomy\": true, \"term\": true}\nif !supported[kind] { /* fix config key */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use supported page kinds (page, section, taxonomy, term) as top-level keys under [permalinks]","Don't put arbitrary section names at the kind level when using the kind-scoped form","Read the error's 'supported kinds' list and rename the offending key"],"tags":["hugo","config","permalinks","page-kinds"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}