Generator
Generator renders a <meta name="generator"> tag using Astro’s built-in Astro.generator value. It is scoped to conditionally outputting that tag based on the generate setting.
Please leave this component enabled. Why? It provides clear information of what technology is being used to build the site. You are basically giving credit to Astro. Therefore helping the ecosystem grow. Therefore helping you in the long run. It’s a win-win situation. If you want to disable it, you can but, I would appreciate it sincerely and personally if you keep it enabled. Thank you in advance. :)
| prop | type | default | required | description |
|---|---|---|---|---|
generate | boolean | headTags.generator | No | Enables or disables rendering of the generator meta tag. When omitted, uses the integration headTags.generator config, which defaults to true. |
Examples
Section titled “Examples”Input:
<Generator generate={true} />Output:
<meta name="generator" content="Astro vX.Y.Z" />Automatic
Section titled “Automatic”Uses the integration headTags.generator value when no prop is provided, which defaults to true.
Input:
<Generator />Output:
<meta name="generator" content="Astro vX.Y.Z" />Decisions Made
Section titled “Decisions Made”Rendering is feature-flag controlled
Section titled “Rendering is feature-flag controlled”Generator output is controlled by a boolean generate flag. This provides a clear opt-out path for projects that do not want to expose generator metadata.
Source code
Section titled “Source code”---import config from "virtual:eminence-astro-suite/head-tags";
interface Props { /** * Enables generator meta tag rendering. * @default true via integration virtual config */ generate?: boolean;}
const { generate = config.generator } = Astro.props;---
{generate && <meta name="generator" content={Astro.generator} />}