{"record":{"id":"cb7cc5ba2cd33d4e","repo":"mui/material-ui","slug":"docs-infra-the-description-description-shoul","errorCode":null,"errorMessage":"docs-infra: The description \"${description}\" should end with a \".\" or \"!\", those are sentences.","messagePattern":"docs-infra: The description \"(.+?)\" should end with a \"\\.\" or \"!\", those are sentences\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages-internal/markdown/prepareMarkdown.mjs","lineNumber":130,"sourceCode":"      }\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') {\n        contents.push(`\n## API\n\nSee the documentation below for a complete reference to all of the props and classes available to the components mentioned here.\n\n${headers.components\n  .map((component) => {\n    const componentPkgMap = componentPackageMapping[headers.productId];\n    const componentPkg = componentPkgMap ? componentPkgMap[component] : null;\n    return `- [\\`<${component} />\\`](${resolveComponentApiUrl(\n      headers.productId,","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/mui/material-ui/blob/bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5/packages-internal/markdown/prepareMarkdown.mjs#L112-L148","documentation":"prepareMarkdown enforces that the `description:` frontmatter header reads as a sentence: it must end with '.' or '!'. This keeps meta descriptions consistent and grammatical across the docs site. Descriptions ending in other punctuation, emojis, or nothing are rejected at build time.","triggerScenarios":"Writing a `description:` header that ends with a character other than '.' or '!' (e.g. ends with a colon, comma, or no terminal punctuation).","commonSituations":"Description truncated mid-edit; description ending in a trailing quote or parenthesis; copied fragment that was not a full sentence.","solutions":["Rewrite the description as a complete sentence ending in '.' or '!'.","Re-run `pnpm docs:build` to confirm."],"exampleFix":"---\ndescription: A page about buttons:\n---\n// after\n---\ndescription: A page about buttons.\n---","handlingStrategy":"validation","validationCode":"function endsAsSentence(description) {\n  return /[.!]$/.test(description);\n}\nif (!endsAsSentence(headers.description)) throw new Error('Description must end with . or !');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat the description as a full sentence in your writing habit.","Add a docs lint check for terminal punctuation.","Re-read the description after editing to confirm it still ends correctly."],"tags":["docs-infra","seo","build","validation","style"],"backgroundTag":null,"analyzedSha":"bdc96df2cb530fcdd60a7a7aabe37f610ce0f0a5","analyzedAt":"2026-08-12T22:59:56.717Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}