gohugoio/hugo · error

no taxonomy configuration found for

Error message

no taxonomy configuration found for %q

What it means

Returned by pageMeta.initLate (page__meta.go:323) for a page whose Kind is taxonomy or term when getTaxonomyConfig finds no matching view. getTaxonomyConfig (content_map.go:231) matches the page path against the configured plural tree keys; if none prefix-matches, the taxonomy view is empty and Hugo cannot resolve singular/plural names for the page.

Solutions

  1. Add the taxonomy to config: [taxonomies]\ntag = "tags" (hugo.toml), matching the content directory name.
  2. Make the content directory plural match the configured value exactly.
  3. Remove the orphaned taxonomy/term content file if that taxonomy is intentionally disabled.

Example fix

// before (content/tags/foo.md exists, no taxonomies config)
// -> error: no taxonomy configuration found for "/tags/foo/"

// after (hugo.toml)
[taxonomies]
tag = "tags"
Defensive patterns

Strategy: validation

Validate before calling

# every taxonomy dir under content/ must have a matching [taxonomies] entry
for d in content/*/ ; do n=$(basename "$d"); grep -q "^$n\b" config.toml || echo "missing taxonomies entry: $n"; done

Prevention

When it happens

Trigger: A content file is placed under a taxonomy path (e.g. content/tags/foo.md giving Kind=term) but the site's [taxonomies] config does not define that taxonomy (no `tag = "tags"` entry), so no view matches the path. Also possible if the taxonomy key casing/pluralization in config differs from the directory.

Common situations: Theme expects 'tags'/'categories' but the user disabled or renamed taxonomies in config; orphaned taxonomy content left after removing a taxonomy; directory name and config plural not matching.

Related errors


AI-assisted analysis of gohugoio/hugo@52c9bd7908 (2026-08-09). Data as JSON: /api/errors/f19dee40ee006ce7. Report an issue: GitHub.

Appendix: source

Thrown at hugolib/page__meta.go:323

			m.pathInfo = m.f.FileInfo().Meta().PathInfo
		}

		if m.pathInfo == nil {
			panic(fmt.Sprintf("missing pathInfo in %v", m))
		}
	}
	return nil
}

func (m *pageMeta) initLate(s *Site) error {
	var tc viewName

	if m.pageConfigSource.Kind == kinds.KindTerm || m.pageConfigSource.Kind == kinds.KindTaxonomy {
		if tc.IsZero() {
			tc = s.pageMap.cfg.getTaxonomyConfig(m.Path())
		}
		if tc.IsZero() {
			return fmt.Errorf("no taxonomy configuration found for %q", m.Path())
		}
		m.singular = tc.singular

		if m.pageConfigSource.Kind == kinds.KindTerm {
			m.term = paths.TrimLeading(strings.TrimPrefix(m.pathInfo.Unnormalized().Base(), "/"+tc.plural))
		}
	}

	return nil
}

// bookmark1
func (h *HugoSites) newPageMetaSourceFromFile(fi hugofs.FileMetaInfo) (*pageMetaSource, error) {
	p, err := func() (*pageMetaSource, error) {
		meta := fi.Meta()
		openSource := func() (hugio.ReadSeekCloser, error) {
			r, err := meta.Open()
			if err != nil {

View on GitHub (pinned to 52c9bd7908)