✅ What’s Already Set Up


📁 Blade Partials:
  • partials/seo.blade.php - Main SEO tags

  • partials/browser-appearance.blade.php - Browser settings

  • partials/fallback-description.blade.php - Fallback description

  • partials/cookie-dialog.blade.php - Cookie consent dialog

  • partials/seo-body.blade.php - Scripts for the body

📋 Blueprints:
  • globals/seo.yaml - Global SEO settings

  • globals/browser_appearance.yaml - Browser appearance settings

  • collections/pages/page.yaml - Updated with SEO fields

📄 Global Sets Data:
  • content/globals/seo.yaml - Base SEO data

  • content/globals/browser_appearance.yaml - Base browser data

🎨 Layout:
  • layout.blade.php - Integrated with the SEO system


🔧 What Needs to Be Configured

1. Create Global Sets in the Admin Panel

Log into the Statamic admin panel and create:

  • Global Set with handle seo

  • Global Set with handle browser_appearance

2. Set Up Favicon
3. Add SEO Fields to Other Collections

For each collection (posts, products, etc.), add SEO fields.

4. Configure Variables in Global Sets

SEO Settings:

yaml

site_name: 'Your Site'
title_separator: ' | '
tracker_type: 'gtag'  # or 'gtm'
google_analytics: 'G-XXXXXXXXXX'
organization_name: 'Your Company'
twitter_handle: '@yourhandle'

Browser Appearance:

yaml

theme_color: '#1e293b'  # Your primary color

🎯 How to Use

In Page Templates: (already implemented)

antlers

{{# layout.antlers #}} {{# All SEO tags are automatically included #}}  <main>     <h1>{{ title }}</h1>     {{ content }} </main>
In Collection Pages:

SEO fields will be automatically available in the admin panel:

  • SEO Title

  • Meta Description

  • Open Graph Image

  • Twitter Image

  • JSON-LD Schema

  • Canonical URLs

  • No-index/No-follow


📊 Features

✅ Automatically Handled:
  • Title Tags - SEO Title | Site Name

  • Meta Descriptions - From fields or fallback

  • Open Graph - For Facebook, LinkedIn

  • Twitter Cards - For Twitter

  • JSON-LD Schema - Structured data

  • Canonical URLs - Duplicate content handling

  • Robots Meta - Indexing based on environment

  • Breadcrumbs - JSON-LD breadcrumbs

  • Cookie Consent - GDPR compliance

  • Analytics - Google Analytics/GTM

  • Favicons - All sizes and formats

🌍 Multi-environment:
  • Local - No indexing, no analytics

  • Staging - Noindex, no analytics

  • Production - Full indexing and analytics

🍪 Cookie Consent:
  • Automatic consent management

  • Google Consent API integration

  • Customizable cookie types

  • Consent revocation by date

🛠️ Additional Configurations

For Fathom Analytics:

yaml

use_fathom: true
fathom: 'YOURCODE'

For Cloudflare Analytics:

yaml

use_cloudflare_web_analytics: true
cloudflare_web_analytics: 'your-token'

For Google Site Verification:

yaml

use_google_site_verification: true
google_site_verification: 'your-code'

🎨 Styling the Cookie Dialog

The cookie dialog uses your CSS variables:

  • bg-card / text-card-foreground

  • bg-primary / text-primary-foreground

  • rounded-panel-md

  • shadow-custom-lg

🚨 Important Notes

  1. Environment Variables: Ensure APP_ENV is set correctly

  2. Assets Container: Create an assets container for images

  3. Collections: Add collections to sitemap settings

  4. Permissions: Verify write permissions for the storage directory for caching

🔍 Verifying Functionality

  1. Open the page source code

  2. Check for the presence of meta tags

  3. Use tools:

    • Google Search Console

    • Facebook Sharing Debugger

    • Twitter Card Validator

    • Rich Results Test

Your SEO system is ready to go! 🎉