Description
Description renders a <meta name="description"> tag in the document head. It is responsible for serializing the provided description text and does not generate, truncate, or validate SEO copy.
| prop | type | default | required | description |
|---|---|---|---|---|
content | string | - | Yes | Explicit page description text serialized directly to the meta tag content attribute. |
Examples
Section titled “Examples”Input:
<Description content="Learn how to build efficient web applications" />Output:
<meta name="description" content="Learn how to build efficient web applications"/>Decisions Made
Section titled “Decisions Made”No automatic fallback
Section titled “No automatic fallback”The component does not read from integration config or page defaults. Requiring a direct value ensures each page can define a deliberate summary rather than inheriting potentially inaccurate text.
Source code
Section titled “Source code”---interface Props { /** * The page-specific meta description content. This should be a concise summary of the page's content, ideally between 50-160 characters. */ content: string;}---
<meta name="description" content={Astro.props.content} />