Every LiteInk theme ships with SEO baked in. Here’s what’s included and how to tune it.
What’s Included
All themes come with:
- Per-page meta titles and descriptions — Set in frontmatter or page props
- Canonical URLs — Prevents duplicate content issues
- Open Graph tags — Rich previews when shared on social media
- Twitter/X card metadata — Optimized link previews
- JSON-LD structured data — Helps search engines understand your content
- XML sitemap — Auto-generated by
@astrojs/sitemap - robots.txt — Controls crawler access
- Semantic HTML — Proper heading hierarchy, landmarks, alt text
Setting Page Metadata
Each page sets its title and description via layout props:
---
import Base from '../layouts/Base.astro';
---
<Base title="About Us — My Company" description="Learn about our team and mission.">
<h1>About Us</h1>
</Base>
For content collection pages (blog posts), set these in frontmatter:
---
title: How We Built Our Product
description: A behind-the-scenes look at our process.
---
Setting Your Domain
The site option in astro.config.mjs is critical — it generates canonical URLs and sitemap entries:
export default defineConfig({
site: 'https://yoursite.com',
output: 'static',
});
Set this before deploying. Wrong domain = broken canonical URLs.
Open Graph Images
Social previews use Open Graph images. Set the og:image in your layout or per page:
<meta property="og:image" content="https://yoursite.com/img/og.png" />
Recommended size: 1200 × 630 pixels. Place your OG image in public/img/og.png.
Submitting to Search Engines
After deploying:
-
Google Search Console — Go to search.google.com/search-console, add your property, and submit your sitemap URL (
https://yoursite.com/sitemap-index.xml) -
Bing Webmaster Tools — Go to bing.com/webmasters, add your site, and submit the same sitemap
-
IndexNow (optional) — For faster indexing, ping search engines when you publish new content
SEO Checklist
-
siteinastro.config.mjsmatches your domain - Every page has a unique title and description
- Sitemap is accessible at
/sitemap-index.xml -
robots.txtis not blocking important pages - Images have descriptive
altattributes - OG image exists and renders correctly
- Submitted sitemap to Google Search Console
What’s Next?
- FAQ — Common questions