'use client'; import * as Icons from '../Icons'; import ToggleCard from '../fields/ToggleCard'; import type { SectionProps } from './types'; export default function SeoSection({ settings, update, siteUrlInfo, }: SectionProps & { /** Resolved site URL and its origin, so the panel can name SITE_URL (#472). */ siteUrlInfo: { effective: string | null; source: 'env' | 'settings' | 'none' } | null; }) { return (
Customize search engine metadata, OpenGraph tags, and indexing rules.
Needed for sitemap.xml, the feed and structured data — those are generated
without a request, so the address cannot be derived from it. Leave empty and the sitemap
stays empty rather than guessing.
{siteUrlInfo?.source === 'env' && (
<>
Currently supplied by the SITE_URL environment variable (
{siteUrlInfo.effective}). A value entered here takes precedence once
saved.
>
)}
Template for subpages & albums. Use %s as placeholder for the page title.
Preview:{' '}
{(
settings.seo?.titleTemplate ||
`%s | ${settings.seo?.title || settings.title || 'My Portfolio'}`
).replace('%s', 'Landscapes')}
Control how Googlebot and other web crawlers index your site.