{"record":{"id":"cdfe7a564668c78b","repo":"gohugoio/hugo","slug":"unknown-default-output-format-q","errorCode":null,"errorMessage":"unknown default output format %q","messagePattern":"unknown default output format %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/allconfig/allconfig.go","lineNumber":329,"sourceCode":"\t\t\tif isRssDisabled && format == \"rss\" {\n\t\t\t\t// Legacy config.\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tf, found := outputFormats.GetByName(format)\n\t\t\tif !found {\n\t\t\t\ttransientErr = fmt.Errorf(\"unknown output format %q for kind %q\", format, kind)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tkindOutputFormats[kind] = append(kindOutputFormats[kind], f)\n\t\t}\n\t}\n\n\tdefaultOutputFormat := outputFormats[0]\n\tc.DefaultOutputFormat = strings.ToLower(c.DefaultOutputFormat)\n\tif c.DefaultOutputFormat != \"\" {\n\t\tf, found := outputFormats.GetByName(c.DefaultOutputFormat)\n\t\tif !found {\n\t\t\treturn fmt.Errorf(\"unknown default output format %q\", c.DefaultOutputFormat)\n\t\t}\n\t\tdefaultOutputFormat = f\n\t} else {\n\t\tc.DefaultOutputFormat = defaultOutputFormat.Name\n\t}\n\n\tdisabledLangs := make(map[string]bool)\n\tfor _, lang := range c.DisableLanguages {\n\t\tdisabledLangs[lang] = true\n\t}\n\n\tfor i, s := range c.IgnoreLogs {\n\t\tc.IgnoreLogs[i] = strings.ToLower(s)\n\t}\n\n\tignoredLogIDs := make(map[string]bool)\n\tfor _, err := range c.IgnoreLogs {\n\t\tignoredLogIDs[err] = true","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/config/allconfig/allconfig.go#L311-L347","documentation":"Returned (fatally, not transient) by CompileConfig when `defaultOutputFormat` names a format not found via outputFormats.GetByName. Unlike error 253, this is the single site-wide default and aborts config compilation entirely.","triggerScenarios":"Setting `defaultOutputFormat = \"FOO\"` in config when 'FOO' is not a registered output format. Empty value is allowed (defaults to the first format, normally HTML); an unknown non-empty value is not.","commonSituations":"Typos in defaultOutputFormat (e.g. 'html' lowercase vs 'HTML'), referencing a custom format that was removed, or copy-pasting a theme config whose custom format is not installed.","solutions":["Set defaultOutputFormat to a registered format name (built-in or custom under outputFormats).","Leave it empty/unset to use the default (HTML).","Verify the exact case-sensitive name against outputFormats keys."],"exampleFix":"// before\ndefaultOutputFormat = \"html\"\n// after\ndefaultOutputFormat = \"HTML\"","handlingStrategy":"validation","validationCode":"func validateDefaultFormat(cfg output.Formats, name string) error {\n  if name == \"\" { return nil }\n  if _, ok := cfg.GetByName(name); !ok { return fmt.Errorf(\"unknown default output format %q\", name) }\n  return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Leave defaultOutputFormat unset to use HTML.","Verify case-sensitive format names against outputFormats.","Re-run `hugo config` to confirm the resolved default."],"tags":["config","output-format","default","allconfig"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}