{"record":{"id":"17da55d876e97ee4","repo":"gohugoio/hugo","slug":"project-config-markup-goldmark-renderhooks-link-us","errorCode":null,"errorMessage":"project config markup.goldmark.renderHooks.link.useEmbedded must be one of %s","messagePattern":"project config markup\\.goldmark\\.renderHooks\\.link\\.useEmbedded must be one of (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/allconfig/allconfig.go","lineNumber":497,"sourceCode":"\t\tif *c.Markup.Goldmark.RenderHooks.Link.EnableDefault {\n\t\t\tc.Markup.Goldmark.RenderHooks.Link.UseEmbedded = gc.RenderHookUseEmbeddedFallback\n\t\t} else {\n\t\t\tc.Markup.Goldmark.RenderHooks.Link.UseEmbedded = gc.RenderHookUseEmbeddedNever\n\t\t}\n\t}\n\n\t// Validate render hook configuration.\n\trenderHookUseEmbeddedModes := []string{\n\t\tgc.RenderHookUseEmbeddedAlways,\n\t\tgc.RenderHookUseEmbeddedAuto,\n\t\tgc.RenderHookUseEmbeddedFallback,\n\t\tgc.RenderHookUseEmbeddedNever,\n\t}\n\tif !slices.Contains(renderHookUseEmbeddedModes, c.Markup.Goldmark.RenderHooks.Image.UseEmbedded) {\n\t\treturn fmt.Errorf(\"project config markup.goldmark.renderHooks.image.useEmbedded must be one of %s\", helpers.StringSliceToList(renderHookUseEmbeddedModes, \"or\"))\n\t}\n\tif !slices.Contains(renderHookUseEmbeddedModes, c.Markup.Goldmark.RenderHooks.Link.UseEmbedded) {\n\t\treturn fmt.Errorf(\"project config markup.goldmark.renderHooks.link.useEmbedded must be one of %s\", helpers.StringSliceToList(renderHookUseEmbeddedModes, \"or\"))\n\t}\n\n\tc.C = &ConfigCompiled{\n\t\tTimeout:             timeout,\n\t\tBaseURL:             baseURL,\n\t\tBaseURLLiveReload:   baseURL,\n\t\tDisabledKinds:       disabledKinds,\n\t\tDisabledLanguages:   disabledLangs,\n\t\tIgnoredLogs:         ignoredLogIDs,\n\t\tKindOutputFormats:   kindOutputFormats,\n\t\tDefaultOutputFormat: defaultOutputFormat,\n\t\tCreateTitle:         helpers.GetTitleFunc(c.TitleCaseStyle),\n\t\tIsUglyURLSection:    isUglyURL,\n\t\tIgnoreFile:          ignoreFile,\n\t\tMainSections:        c.MainSections,\n\t\tClock:               clock,\n\t\tHTTPCache:           httpCache,\n\t\ttransientErr:        transientErr,","sourceCodeStart":479,"sourceCodeEnd":515,"githubUrl":"https://github.com/gohugoio/hugo/blob/52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2/config/allconfig/allconfig.go#L479-L515","documentation":"Returned by CompileConfig when markup.goldmark.renderHooks.link.useEmbedded is not one of the four allowed modes: always, auto, fallback, never. Same validation shape as the image hook (error 257) but for link render hooks.","triggerScenarios":"Setting `markup.goldmark.renderHooks.link.useEmbedded` to any value outside {always, auto, fallback, never}, e.g. 'yes', 'on', '1', 'default'.","commonSituations":"Same migration pain as 257: older configs used the boolean enableDefault; mistyped or locale-translated strings ('jamais' instead of 'never') also trip it.","solutions":["Set the value to one of: always, auto, fallback, never.","If migrating from enableDefault: true → fallback, false → never.","Remove the key to accept the default."],"exampleFix":"// before\n[markup.goldmark.renderHooks.link]\nuseEmbedded = \"true\"\n// after\n[markup.goldmark.renderHooks.link]\nuseEmbedded = \"fallback\"","handlingStrategy":"validation","validationCode":"var useEmbeddedModes = []string{\"always\",\"auto\",\"fallback\",\"never\"}\nfunc validateLinkUseEmbedded(s string) error {\n  if !slices.Contains(useEmbeddedModes, s) { return fmt.Errorf(\"useEmbedded must be one of %v\", useEmbeddedModes) }\n  return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Apply the same migration rule as image: true→fallback, false→never.","Avoid locale-translated mode strings.","Omit the key to default."],"tags":["config","goldmark","render-hooks","link","markup"],"backgroundTag":null,"analyzedSha":"52c9bd7908b4d02d4d0ff8f82a888834d6ee10d2","analyzedAt":"2026-08-09T21:49:36.660Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}