CONNECT-platform

The MetaOverride component allows you to override some of the meta information of a specific page (as opposed to the whole project):

1> :MetaOverride target=description2>3> Some specific description for this particular page.45> :MetaOverride target=keywords, behavior=extend6>7> additional, keywords, for this page

You can specify which meta tag you want to override via target attribute. The following values are supported for this attribute:

• subject: the subject of the content of the page.

• description: the description of the content of the page.

• keywords: the keywords attributed to content of the page, specifically useful for SEO optimization. content must be a comma separated list of keywords.

• canonical: the canonical link of the page.

In some cases you might want to extend the global meta set for your doc pages via some other configuration (e.g. .codedoc/config.ts). For example, you might want to have your global keywords set on each page and then defined some page-specific keywords for a specific page.

For such cases, you can use the behavior attribute:

1> :MetaOverride target=keywords, behavior=extend2>3> additional, keywords, for this page

The behavior attribute's value can be either replace (default) or extend. In case of replace, if there is an existing meta tag with the same target (i.e. name attribute), then its content will be replaced by what you have provided. In case of extend, the content will be extended:

• For subject and description targets, the override content will be concatenated to the original content separated by a space.
• For keywords, the array of new keywords will be concatenated with the array of original keywords, then all of them will be joined with ,.

You can also use property instead of target to provide custom meta information for each page. For example you can supply custom information for representation of your page in social media cards like this:

1> :MetaOverride property=og:title2>3> Title of the page on the social media cards45> :MetaOverride property=og:image6>7> An absolute URL for the social media cards

Additionally, you can provide custom values for target attribute as well, though you should not use extend behavior for such values (as CODEDOC's best guess at how to extend such values might result in undesired content values).

1> :MetaOverride property=twitter:image2>3> An absolute URL for the social media cards
Markdownchevron_right
Code Featureschevron_right

Images & Assets

Configurationchevron_right
Customizationchevron_right