Carries per-page search engine optimisation metadata for a renderable resource, such as a meta description, keywords, canonical URL and structured data. Built by a resource that implements the seo resource contract (for example a blog article, blog folder or rendered file) and returned from its seoContent getter, then read by the site theme when rendering the page head, so the values here end up as meta tags and a JSON-LD script block in the rendered HTML.


Properties

PropertyReturnsDescription
canonicalStringCanonical URL for the page, rendered into the rel=canonical link tag so search engines treat this URL as the authoritative source for the content. May be null if no canonical URL has been set.
descriptionStringMeta description text for the page, rendered into the meta description tag. May be null if no description has been set, in which case the theme falls back to its own default.
keywordsList<String>Meta keywords for the page, rendered into the meta keywords tag. May be null or empty if no keywords have been set.
structuredDataMapStructured data for the page, rendered as a JSON-LD script block (application/ld+json) in the page head. The map follows the schema.org vocabulary. May be null if no structured data has been set.

Methods

getDescription() · setDescription(String description) · withDescription(String description) · getKeywords() · setKeywords(List<String> keywords) · setKeywords(String keywords) · withKeywords(List<String> keywords) · withKeywords(String keywords) · getCanonical() · setCanonical(String canonical) · withCanonical(String canonical) · getStructuredData() · setStructuredData(Map structuredData) · withStructuredData(Map structuredData)

getDescription()

Returns: String

Meta description text for the page, rendered into the meta description tag. May be null if no description has been set, in which case the theme falls back to its own default.

setDescription(String description)

Returns: void

Sets the meta description text for the page.

ParameterDescription
descriptionthe meta description text to render

withDescription(String description)

Returns: SeoContentBean

Sets the meta description text and returns this bean, for chained construction.

ParameterDescription
descriptionthe meta description text to render

getKeywords()

Returns: List<String>

Meta keywords for the page, rendered into the meta keywords tag. May be null or empty if no keywords have been set.

setKeywords(List<String> keywords)

Returns: void

Sets the meta keywords for the page.

ParameterDescription
keywordsthe keywords to render, or null to clear them

setKeywords(String keywords)

Returns: void

Sets the meta keywords for the page from individual keyword arguments.

ParameterDescription
keywordsthe keywords to render, or null to clear them

withKeywords(List<String> keywords)

Returns: SeoContentBean

Sets the meta keywords from a list and returns this bean, for chained construction.

ParameterDescription
keywordsthe keywords to render, or null to clear them

withKeywords(String keywords)

Returns: SeoContentBean

Sets the meta keywords from individual keyword arguments and returns this bean, for chained construction.

ParameterDescription
keywordsthe keywords to render, or null to clear them

getCanonical()

Returns: String

Canonical URL for the page, rendered into the rel=canonical link tag so search engines treat this URL as the authoritative source for the content. May be null if no canonical URL has been set.

setCanonical(String canonical)

Returns: void

Sets the canonical URL for the page.

ParameterDescription
canonicalthe canonical URL to render

withCanonical(String canonical)

Returns: SeoContentBean

Sets the canonical URL and returns this bean, for chained construction.

ParameterDescription
canonicalthe canonical URL to render

getStructuredData()

Returns: Map

Structured data for the page, rendered as a JSON-LD script block (application/ld+json) in the page head. The map follows the schema.org vocabulary. May be null if no structured data has been set.

setStructuredData(Map structuredData)

Returns: void

Sets the structured data for the page, as a map following the schema.org vocabulary.

ParameterDescription
structuredDatathe structured data to render as JSON-LD

withStructuredData(Map structuredData)

Returns: SeoContentBean

Sets the structured data and returns this bean, for chained construction.

ParameterDescription
structuredDatathe structured data to render as JSON-LD
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.