用途:为 Astro 项目统一实现技术 SEO 标记,适用于以获客为目标的 Astro 站点。
主要能力:每页生成唯一 title 与 description;设置 canonical URL;输出 Open Graph 与 Twitter 卡片标记;为首页、服务页、FAQ 页提供 Schema.org 结构化数据(LocalBusiness、Service、FAQPage);通过 @astrojs/sitemap 自动生成站点地图;对指定页面设置 noindex。
使用方式:在页面组件中读取 title、description、image、noindex 等 props,用 Astro.site 与 Astro.url.pathname 拼接 canonicalURL,并在 head 中输出相应 meta 标签。站点地图需在 astro.config.mjs 中配置 site 并引入 sitemap 集成: import sitemap from '@astrojs/sitemap'; export default { site: 'https://yourdomain.com', integrations: [sitemap()] }
适用场景:获客型 Astro 网站的技术 SEO;需要富媒体搜索结果的结构化数据;需控制索引状态的页面(如感谢页、404/410、后台或预览页、重复内容页)。
限制:资料未提供具体安装命令、版本要求、性能数据或收费信息,暂未提供。