First Payload¶
By the end of this page you will build an SEO payload, read its fields, and serialize it. Make sure easeo is installed first.
Step 1: Configure the site¶
SEOConfig holds values that are the same for every page on your site. Two
fields are required:
canonical_host: the hostname only, with no scheme and no path.public_base_url: the absolute base URL used to resolve canonical paths.
Step 2: Describe the content¶
SEOEntity describes one piece of content. Only entity_type is required.
Valid entity types are: home, post, page, video, taxonomy, search,
product, organization, local_business, faq, and other.
Step 3: Build the payload¶
The one function you need:
Step 4: Read the result¶
Step 5: Serialize¶
Determinism check¶
Building the same payload twice always yields the same bytes:
Recap¶
SEOConfigis site-wide;SEOEntityis per page.build_seo_payload(entity, route, config)returns anSEOPayload.- The payload is structured, hashable, and serializable.
Next: Fallback and Overrides.