SEOOverrides reference¶
SEOOverrides lets you override any field that seoslug would otherwise generate.
Pass it as the fourth argument to build_seo_payload().
Fields¶
meta_title (optional)¶
Overrides the title tag. Takes highest precedence in the title fallback chain.
meta_description (optional)¶
Overrides the meta description. Takes highest precedence in the description fallback chain.
canonical_url (optional)¶
Overrides the canonical URL. Takes highest precedence in the canonical fallback chain.
robots (optional)¶
Overrides the robots directive. Takes highest precedence in the robots fallback chain.
og_title (optional)¶
Overrides the Open Graph title. When set, it also becomes the fallback for the Twitter title.
og_description (optional)¶
Overrides the Open Graph description. When set, it also becomes the fallback for the Twitter description.
og_image (optional)¶
Overrides the Open Graph image. When set, it also becomes the fallback for the Twitter image.
twitter_card (optional)¶
Overrides the Twitter card type. Defaults to "summary_large_image".
twitter_title (optional)¶
Overrides the Twitter title. Takes highest precedence over the OG title fallback.
twitter_description (optional)¶
Overrides the Twitter description. Takes highest precedence over the OG description fallback.
twitter_image (optional)¶
Overrides the Twitter image. Takes highest precedence over the OG image fallback.
schema_jsonld (optional)¶
Provides a custom JSON-LD schema object. Accepts a dict or a list of dicts. When set, seoslug uses this value instead of auto generating schema.
SEOOverrides(schema_jsonld={
"@context": "https://schema.org",
"@type": "Product",
"name": "Custom Product",
})
omit_schema (optional)¶
Disables schema generation for a single entity. When True, no schema_jsonld key is added to the payload. Defaults to False.
Example¶
Force a custom image and disable indexing for a specific page.