{"id":"f19dee40ee006ce7","repo":"gohugoio/hugo","slug":"no-taxonomy-configuration-found-for-q","errorCode":null,"errorMessage":"no taxonomy configuration found for %q","messagePattern":"no taxonomy configuration found for %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"hugolib/page__meta.go","lineNumber":323,"sourceCode":"\t\t\tm.pathInfo = m.f.FileInfo().Meta().PathInfo\n\t\t}\n\n\t\tif m.pathInfo == nil {\n\t\t\tpanic(fmt.Sprintf(\"missing pathInfo in %v\", m))\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (m *pageMeta) initLate(s *Site) error {\n\tvar tc viewName\n\n\tif m.pageConfigSource.Kind == kinds.KindTerm || m.pageConfigSource.Kind == kinds.KindTaxonomy {\n\t\tif tc.IsZero() {\n\t\t\ttc = s.pageMap.cfg.getTaxonomyConfig(m.Path())\n\t\t}\n\t\tif tc.IsZero() {\n\t\t\treturn fmt.Errorf(\"no taxonomy configuration found for %q\", m.Path())\n\t\t}\n\t\tm.singular = tc.singular\n\n\t\tif m.pageConfigSource.Kind == kinds.KindTerm {\n\t\t\tm.term = paths.TrimLeading(strings.TrimPrefix(m.pathInfo.Unnormalized().Base(), \"/\"+tc.plural))\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// bookmark1\nfunc (h *HugoSites) newPageMetaSourceFromFile(fi hugofs.FileMetaInfo) (*pageMetaSource, error) {\n\tp, err := func() (*pageMetaSource, error) {\n\t\tmeta := fi.Meta()\n\t\topenSource := func() (hugio.ReadSeekCloser, error) {\n\t\t\tr, err := meta.Open()\n\t\t\tif err != nil {","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/gohugoio/hugo/blob/8a468df065a75c1c7cf9f6850f32148746590ea5/hugolib/page__meta.go#L305-L341","documentation":"pageMeta.initLate resolves the taxonomy view for pages of kind taxonomy or term by prefix-matching the page path against the configured taxonomies (getTaxonomyConfig). If no configured taxonomy matches the path, Hugo cannot determine the singular/plural names or the term, so it fails. It means a taxonomy/term page exists for a taxonomy the site config doesn't declare.","triggerScenarios":"A page is assigned KindTaxonomy or KindTerm — via content files like content/tags/_index.md when \"tags\" isn't in the taxonomies config, via a content adapter or front matter forcing kind: term/taxonomy, or after removing/renaming a taxonomy in config while its _index.md pages remain — and getTaxonomyConfig finds no view whose pluralTreeKey prefixes the page path.","commonSituations":"Setting `disableKinds` or a custom `taxonomies` block in hugo.toml that removes the default tags/categories while content/tags/_index.md still exists; renaming a taxonomy (e.g. tags → topics) in config without moving the content directory; theme-provided term pages for taxonomies the site never enabled.","solutions":["Declare the taxonomy in site config so it matches the page path, e.g. `[taxonomies]\\n  tag = \"tags\"` in hugo.toml.","If the taxonomy was intentionally removed, delete or rename the stale content/<plural>/ directory (its _index.md pages) too.","If the page shouldn't be a taxonomy/term page, remove the explicit `kind` override in its front matter or content adapter."],"exampleFix":"# before (hugo.toml)\n[taxonomies]\n  category = \"categories\"\n# content/tags/_index.md exists -> error\n# after\n[taxonomies]\n  category = \"categories\"\n  tag = \"tags\"","handlingStrategy":"validation","validationCode":"// site config must declare every taxonomy referenced in front matter\n// hugo.toml:\n// [taxonomies]\n//   tag = 'tags'\n//   category = 'categories'\n// check: front matter keys like `tags:`/`categories:` must map to an entry above","typeGuard":null,"tryCatchPattern":"if err := site.Build(); err != nil {\n    if strings.Contains(err.Error(), \"no taxonomy configuration found\") {\n        // add the missing taxonomy to [taxonomies] in site config, or remove the front matter key\n    }\n    return err\n}","preventionTips":["Remember that defining any [taxonomies] block replaces the defaults — re-declare tags/categories explicitly if you still use them","Keep front matter taxonomy keys (plural) in sync with the plural values in config","Check disableKinds: disabling taxonomy kinds while pages still declare terms causes mismatches","Build in CI after any config change touching taxonomies"],"tags":["hugo","taxonomy","configuration","build"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}