{"record":{"id":"e2e6d0590cae0a7a","repo":"mui/material-ui","slug":"docs-infra-the-description-description-is-to","errorCode":null,"errorMessage":"docs-infra: The description \"${description}\" is too long (${description.length} characters).\\nIt needs to have fewer than 170 characters—ideally less than 160. For more details, see:\\nhttps://ahrefs.com/blog/meta-description/#4-be-concise\\n","messagePattern":"docs-infra: The description \"(.+?)\" is too long \\((.+?) characters\\)\\.\\\\nIt needs to have fewer than 170 characters—ideally less than 160\\. For more details, see:\\\\nhttps://ahrefs\\.com/blog/meta-description/#4-be-concise\\\\n","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages-internal/markdown/prepareMarkdown.mjs","lineNumber":119,"sourceCode":"      }\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      }\n\n      const contents = getContents(markdown);\n\n      if (headers.components.length > 0 && headers.productId !== 'base-ui') {","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/mui/material-ui/blob/bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5/packages-internal/markdown/prepareMarkdown.mjs#L101-L137","documentation":"prepareMarkdown caps the docs page description at 160 characters (with a hard ceiling of 170 referenced in the message) to match search-engine meta-description truncation. A longer description fails the build rather than silently being cut off in search results.","triggerScenarios":"Writing a `description:` frontmatter header longer than 160 characters; the build runs the length check and throws.","commonSituations":"Verbose description copied from body prose; description that grows during translation.","solutions":["Trim the `description:` header to under 160 characters.","Move excess detail into the page body.","Re-run `pnpm docs:build` to confirm."],"exampleFix":"---\ndescription: A description that rambles on for well over one hundred and sixty characters and includes far more information than any search engine snippet would ever display usefully...\n---\n// after\n---\ndescription: A concise summary of the page, under 160 characters.\n---","handlingStrategy":"validation","validationCode":"function validateDescription(description) {\n  if (description.length > 160) throw new Error(`Description too long: ${description.length}`);\n  return description;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enforce description length <= 160 in a docs lint rule.","Run `pnpm docs:build` locally before pushing.","Keep descriptions as one concise sentence."],"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"}