Star

MIT License
Copyright © 2020
CONNECT-platform

linkPage-Specific Meta

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=description

2>

3> Some specific description for this particular page.

4

5> :MetaOverride target=keywords, behavior=extend

6>

7> additional, keywords, for this page


linkOverridable Meta Tags

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


linkExtending Global Meta

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=extend

2>

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:


linkCustom Meta Properties

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:title

2>

3> Title of the page on the social media cards

4

5> :MetaOverride property=og:image

6>

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:image

2>

3> An absolute URL for the social media cards

Page-Specific MetaOverridable Meta TagsExtending Global MetaCustom Meta Properties

Home Overview CLI Theme

Markdownchevron_right
Code Featureschevron_right

Images & Assets

Configurationchevron_right
Customizationchevron_right