MIT License
Copyright © 2020

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

1link> :MetaOverride target=description


3link> Some specific description for this particular page.


5link> :MetaOverride target=keywords, behavior=extend


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

1link> :MetaOverride target=keywords, behavior=extend


3link> 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:

1link> :MetaOverride property=og:title


3link> Title of the page on the social media cards


5link> :MetaOverride property=og:image


7link> 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).

1link> :MetaOverride property=twitter:image


3link> An absolute URL for the social media cards

Page-Specific MetaOverridable Meta TagsExtending Global MetaCustom Meta Properties

Home Overview CLI Theme

Code Featureschevron_right

Images & Assets