Allow plugin render hooks to add link tags to the page (#1963)
Adds an extra optional property to plugin render results to allow plugins to add `<link>` tags to the page.
This commit is contained in:
@@ -599,6 +599,8 @@ export interface PluginRenderResult {
|
||||
styles?: PluginRenderStyleTag[];
|
||||
/** JS scripts to ship to the client. */
|
||||
scripts?: PluginRenderScripts[];
|
||||
/** Link tags for the page */
|
||||
links?: PluginRenderLink[];
|
||||
}
|
||||
|
||||
export interface PluginRenderStyleTag {
|
||||
@@ -607,6 +609,17 @@ export interface PluginRenderStyleTag {
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export type PluginRenderLink = {
|
||||
crossOrigin?: string;
|
||||
href?: string;
|
||||
hreflang?: string;
|
||||
media?: string;
|
||||
referrerPolicy?: string;
|
||||
rel?: string;
|
||||
title?: string;
|
||||
type?: string;
|
||||
};
|
||||
|
||||
export interface PluginRenderScripts {
|
||||
/** The "key" of the entrypoint (as specified in `Plugin.entrypoints`) for the
|
||||
* script that should be loaded. The script must be an ES module that exports
|
||||
|
||||
Reference in New Issue
Block a user