seo library

Lark SEO — Meta tags, OpenGraph, structured data.

Import separately to enable tree-shaking when not using SEO features.

Classes

BaseEntry
The base href tag.
Head configuration object for LarkApp.
HeadEntry
Base class for all head entries.
HeadManager
Central manager for all head tags.
LinkEntry
A link tag.
MetaEntry
A meta tag.
ScriptEntry
A script tag.
ServerInit
StyleEntry
An inline style tag.
TitleEntry
The page title.
UrlResolver
Normalizes and resolves asset URLs.

Enums

HeadCategory
Tag categories for grouping and deduplication.
HeadLayer
Priority layers for tag resolution. Higher priority layers override lower ones for tags with the same key.

Constants

serverInit → const ServerInit
Marks a method to run on the server before rendering.

Functions

runWithHeadManager<T>(HeadManager manager, T fn()) → T
Run a function with a specific HeadManager.
useContentSeo(Map<String, dynamic> metadata, {String? type, String? canonical, String? baseUrl}) → void
Applies SEO metadata from a content item's frontmatter.
useHead(List<HeadEntry> entries) → void
Add custom head entries.
useHeadManager() HeadManager
Gets current head manager.
useMeta({String? title, String? description, String? ogTitle, String? ogDescription, String? ogImage, String? ogType, String? ogUrl, String? twitterCard, String? twitterTitle, String? twitterDescription, String? twitterImage, String? canonical, String? robots, String? author, String? themeColor, Map<String, String>? custom}) → void
Sets page meta tags.
useSeo({String? title, String? description, String? image, String? url, String? type, String? ogTitle, String? ogDescription, String? ogImage, String? twitterTitle, String? twitterDescription, String? twitterCard, String? canonical, String? robots, String? author, List<String>? keywords, String? themeColor, String? favicon, String? appleTouchIcon, String? manifest}) → void
Unified SEO API with automatic platform fallbacks.