Documentation

Getting started with Lexington Themes

SEO Configuration

Every theme includes a basic SEO setup powered by the @astrolib/seo integration.
This gives you sensible defaults and support for common meta tags without adding extra bloat to the theme itself.

By default, SEO is only included on the homepage (index.astro).
You can add it to other pages if needed — the code is reusable across your entire site.

Basic Usage

To enable SEO on a page, import and use the <AstroSeo /> component: import { AstroSeo } from ‘@astrolib/seo’;

---
import { AstroSeo } from '@astrolib/seo';
---
<AstroSeo
  title="Your Page Title"
  description="Your page description for search engines"
  canonical="https://yourdomain.com/current-page"
  openGraph={{
    url: "https://yourdomain.com/current-page",
    title: "Your Page Title",
    description: "Your page description",
    images: [
      {
        url: "https://yourdomain.com/og-image.png",
        width: 1200,
        height: 630,
        alt: "Page preview image",
        type: "image/png",
      },
    ],
    site_name: "Your Site Name",
  }}
  twitter={{
    handle: "@yourhandle",
    site: "@yoursite",
    cardType: "summary_large_image",
  }}
/>

Options

  • Base head snippet (default) → The themes includes the <AstroSeo /> snippet in the base head by default. This keeps the setup lightweight and avoids extra configuration before you start using the theme.

  • Homepage only → You can leave the snippet as-is so it applies only to all pages. This provides essential meta tags without adding bloat, but is not recommended..

  • Add to more pages → If you want SEO tags on additional pages (e.g. about.astro, blog/[slug].astro), copy the snippet into those files.

  • Custom metadata per page → Each page can have its own title, description, Open Graph, and Twitter fields and much more to control how it appears in search results and on social media.

Learn more about the Astro SEO integration here.