{"record":{"id":"f9a352379e98b997","repo":"facebook/docusaurus","slug":"to-declare-blog-post-authors-use-the-authors-fr","errorCode":null,"errorMessage":"To declare blog post authors, use the 'authors' front matter in priority.\nDon't mix 'authors' with other existing 'author_*' front matter. Choose one or the other, not both at the same time.","messagePattern":"To declare blog post authors, use the 'authors' front matter in priority\\.\nDon't mix 'authors' with other existing 'author_\\*' front matter\\. Choose one or the other, not both at the same time\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/docusaurus-plugin-content-blog/src/authors.ts","lineNumber":166,"sourceCode":"    return {\n      ...author,\n      key: author.key ?? null,\n      page: author.page ?? null,\n      // global author images have already been normalized\n      imageURL: normalizeAuthorUrl({author, baseUrl}),\n    };\n  }\n}\n\nexport function getBlogPostAuthors(params: AuthorsParam): Author[] {\n  const authorLegacy = getFrontMatterAuthorLegacy(params);\n  const authors = getFrontMatterAuthors(params);\n\n  if (authorLegacy) {\n    // Technically, we could allow mixing legacy/authors front matter, but do we\n    // really want to?\n    if (authors.length > 0) {\n      throw new Error(\n        `To declare blog post authors, use the 'authors' front matter in priority.\nDon't mix 'authors' with other existing 'author_*' front matter. Choose one or the other, not both at the same time.`,\n      );\n    }\n    return [authorLegacy];\n  }\n\n  return authors;\n}\n\n/**\n * Group blog posts by author key\n * Blog posts with only inline authors are ignored\n */\nexport function groupBlogPostsByAuthorKey({\n  blogPosts,\n  authorsMap,\n}: {","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/facebook/docusaurus/blob/3f483e80e326cc646b54b83d564b3f0c4881b9a6/packages/docusaurus-plugin-content-blog/src/authors.ts#L148-L184","documentation":"Thrown by getBlogPostAuthors when a blog post uses both the new 'authors' front matter and any legacy 'author_*' fields (author, author_url, author_image_url, author_title). The plugin refuses to merge them because semantics would be ambiguous; you must pick one style per post.","triggerScenarios":"Front matter contains authors: [...] AND at least one of author / author_url / author_image_url / author_title. getFrontMatterAuthorLegacy returns a value while getFrontMatterAuthors returns a non-empty array.","commonSituations":"Migrating older blog posts to the new authors syntax without fully removing the legacy keys, or copying a template that already had author_* and then adding authors. CI builds break on the first such post.","solutions":["Decide on one style per post: prefer 'authors' front matter.","Delete all legacy author_* keys from the post's front matter.","If you must keep legacy, remove the 'authors' key from that post."],"exampleFix":"---\n# before\nauthor: Jane Doe\nauthor_url: https://example.com\nauthors:\n  - name: Jane Doe\n---\n---\n# after\nauthors:\n  - name: Jane Doe\n    url: https://example.com\n---","handlingStrategy":"validation","validationCode":"const legacyKeys = ['author','author_url','author_image_url','author_title'];\nconst usesLegacy = legacyKeys.some(k => Object.prototype.hasOwnProperty.call(frontMatter, k));\nconst usesNew = Array.isArray(frontMatter.authors) || !!frontMatter.authors;\nif (usesLegacy && usesNew) throw new Error('Do not mix authors with author_*');","typeGuard":"const isLegacyAuthorFm = (fm: Record<string, unknown>) =>\n  ['author','author_url','author_image_url','author_title'].some(k => k in fm);","tryCatchPattern":null,"preventionTips":["When migrating posts to the new 'authors' syntax, script-remove all legacy keys.","Lint blog front matter to forbid mixing the two styles."],"tags":["blog","authors","frontmatter","migration"],"backgroundTag":null,"analyzedSha":"3f483e80e326cc646b54b83d564b3f0c4881b9a6","analyzedAt":"2026-08-12T13:25:04.382Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}