Hybrid Astro UI

PageMetadata

Open in ChatGPT

An all-in-one metadata component that streamlines SEO tags, social preview images, favicon links, font preloading, and optional client-side routing—providing a structured, maintainable way to manage metadata across Astro projects.

Install

pnpm dlx hybrid-astro-ui@latest add page-metadata
npx hybrid-astro-ui@latest add page-metadata
yarn dlx hybrid-astro-ui@latest add page-metadata
bunx hybrid-astro-ui@latest add page-metadata

Usage

---
import { PageMetadata } from "@/src/components/hybrid-astro-ui/page-metadata"
import Image from ".........."
---
<head>
    <PageMetadata
		title="Hybrid Astro UI - Beautifully Crafted UI Components for Your Next Project"
		description="Hybrid-Astro-UI using a hybrid model: zero-JS Astro + progressive enhancement with web components."
		ogType="website"
        enableClientRouter
        loadRSS
		favicons={[
        { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
        { rel: "icon", type: "image/png", href: "/favicon-32.png", sizes: "32x32" },
        { rel: "icon", type: "image/png", href: "/favicon-16.png", sizes: "16x16" },
        { rel: "apple-touch-icon", type: "image/png", href: "/apple-touch-icon.png", sizes: "180x180" },
        { rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#8D40E7" },
        { rel: "manifest", href: "/site.webmanifest" }
        ]}
        preloadFonts={[ 
            { href: "/fonts/Inter-Regular.woff2", type: "font/woff2" },
            { href: "/fonts/Inter-Medium.woff2", type: "font/woff2" },
            { href: "/fonts/Inter-Bold.woff2", type: "font/woff2" }
        ]}
		image={Image}
        googleSiteVerification="hxfjalmjklasdhhcasdooqwejasjdjx"
	/>
</head>

Props