SEO Tools
FrankenCMS includes comprehensive SEO tools to help your content rank better in search engines.
Per-Page SEO Settings
Every post and page includes SEO fields:
SEO tab in the post editor showing Meta Tags, SEO Title, Meta Description, Advanced SEO, and Social Media Sharing fields.
| Field | Description |
|---|---|
| SEO Title | Custom title for search results (overrides post title) |
| Meta Description | Description shown in search results |
| Canonical URL | Preferred URL for duplicate content |
| No Index | Exclude from search engine indexing |
| No Follow | Prevent search engines from following links |
Open Graph Settings
Control how content appears when shared on social media:
- OG Title: Title for social sharing
- OG Description: Description for social sharing
- OG Image: Image for social sharing
- OG Type: Content type (article, website, etc.)
Twitter Cards
FrankenCMS automatically generates Twitter Card meta tags:
- Summary card with large image
- Automatic image selection
- Author Twitter handle
Outputting SEO Tags
Using the Directive
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
@seoHead
</head>
What Gets Output
<title>Page Title | Site Name</title>
<meta name="description" content="Page description...">
<link rel="canonical" href="https://example.com/page">
<!-- Open Graph -->
<meta property="og:type" content="article">
<meta property="og:title" content="Page Title">
<meta property="og:description" content="Page description...">
<meta property="og:image" content="https://example.com/image.jpg">
<meta property="og:url" content="https://example.com/page">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Page description...">
<meta name="twitter:image" content="https://example.com/image.jpg">
<!-- JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
...
}
</script>
XML Sitemaps
FrankenCMS automatically generates XML sitemaps at /sitemap.xml:
- Includes all published posts and pages
- Updates automatically when content changes
- Respects noindex settings
- Includes lastmod dates
Robots.txt
Configure robots.txt through the SEO Settings:
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml
Programmatic SEO
use FrankenCms\Services\SeoService;
$seo = app(SeoService::class);
// Set custom meta for the current page
$seo->setTitle('Custom Title');
$seo->setDescription('Custom description');
$seo->setCanonical('https://example.com/canonical');
$seo->setOgImage('https://example.com/og-image.jpg');