{"record":{"id":"594d02117c1930bf","repo":"mui/material-ui","slug":"docs-infra-missing-description-in-the-page-loc","errorCode":null,"errorMessage":"docs-infra: Missing description in the page: ${location}\\n","messagePattern":"docs-infra: Missing description in the page: (.+?)\\\\n","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages-internal/markdown/prepareMarkdown.mjs","lineNumber":115,"sourceCode":"      const description = headers.description || getDescription(markdown);\n\n      if (title == null || title === '') {\n        throw new Error(`docs-infra: Missing title in the page: ${location}\\n`);\n      }\n\n      if (title.length > 70) {\n        throw new Error(\n          [\n            `docs-infra: The title \"${title}\" is too long (${title.length} characters).`,\n            'It needs to have fewer than 70 characters—ideally less than 60. For more details, see:',\n            'https://developers.google.com/search/docs/advanced/appearance/title-link',\n            '',\n          ].join('\\n'),\n        );\n      }\n\n      if (description == null || description === '') {\n        throw new Error(`docs-infra: Missing description in the page: ${location}\\n`);\n      }\n\n      if (description.length > 160) {\n        throw new Error(\n          [\n            `docs-infra: The description \"${description}\" is too long (${description.length} characters).`,\n            'It needs to have fewer than 170 characters—ideally less than 160. For more details, see:',\n            'https://ahrefs.com/blog/meta-description/#4-be-concise',\n            '',\n          ].join('\\n'),\n        );\n      }\n\n      if (description.slice(-1) !== '.' && description.slice(-1) !== '!') {\n        throw new Error(\n          `docs-infra: The description \"${description}\" should end with a \".\" or \"!\", those are sentences.`,\n        );\n      }","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/mui/material-ui/blob/bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5/packages-internal/markdown/prepareMarkdown.mjs#L97-L133","documentation":"prepareMarkdown requires every docs page to declare a description (the `description:` frontmatter header). The description drives the SEO meta description and social preview. If both the description header and a derived description are empty/missing, the build aborts and names the offending file via ${location}.","triggerScenarios":"Authoring a markdown page with no `description:` header (and no extractable description); renaming/deleting the header during edits.","commonSituations":"New docs page created by duplicating a template that lacked the header; translation file missing the description that the English source has.","solutions":["Add a `description:` header to the page's frontmatter with a one-sentence summary (ending in '.' or '!', see error 8).","Check the error's ${location} to find the exact file to edit.","Re-run `pnpm docs:build` to confirm."],"exampleFix":"---\ntitle: My Page\n---\n// after\n---\ntitle: My Page\ndescription: A concise summary of what this page covers.\n---","handlingStrategy":"validation","validationCode":"function hasDescription(headers) {\n  const d = headers.description;\n  return typeof d === 'string' && d.trim().length > 0;\n}\n// assert hasDescription(headers) before building the page","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Require a `description:` header in the docs markdown template so new pages start with one.","Add a docs lint rule that fails when description is missing.","During translation, copy the English description as a starting point."],"tags":["docs-infra","seo","build","validation"],"backgroundTag":null,"analyzedSha":"bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5","analyzedAt":"2026-08-12T22:59:56.717Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}