Interface | Description |
---|---|
FunctionModule | Defines the functions and fields that are available to the serverless function. |
HeadConfig | The configuration that allows users to entirely arbitarily set the inner contents of the head element that will be prepended to the generated HTML document. |
ModuleConfig | The configuration options for a Module. |
ModuleProps | The shape of the data passed directly to the module's default export. |
PagesHttpRequest | The argument passed to a http/api type function. |
PagesHttpResponse | The return value for a http/api serverless function. |
PagesOnUrlChangeRequest | The argument passed to an onUrlChange type plugin. |
Site | The site information passed to a serverless function by the Yext system. |
StaticTemplateConfig | Shape of TemplateConfig for Static Pages |
Stream | The stream config defined in TemplateConfig.stream. |
Tag | Interface for an HTML tag. Can set attributes on the tag, but if a body needs to be defined, use the other field of the HeadConfig interface. |
TemplateConfig | The exported config function's definition. |
TemplateModule | The type to include in any template file. It defines the available functions and fields that are available to the template. |
TemplateProps | The shape of the data passed directly to the different template functions with the exception of the render function (getPath, getHeadConfig, etc). |
TemplateRenderProps | The shape of the data passed directly to the template's render function. Extends the TemplateProps interface and has the additions of a path and a relativePrefixToRoot field. |
Variable | Description |
---|---|
getLang | Function that takes in a HeadConfig interface and a props, and returns the lang value that will be set on the HTML tag. |
getRelativePrefixToRootFromPath | Function that takes a path to a generated template and returns the relative path to the root of the site. Will return the empty string if already at the root level. |
renderHeadConfigToString | Function that takes a HeadConfig interface and outputs a valid string of HTML that will be inserted into the generated document between the head tags. |
Type Alias | Description |
---|---|
Attributes | Custom type for specifying HTML element attributes in the Tag interface. |
FunctionType | The valid Serverless Function types; |
GetHeadConfig | The type definition for the template's getHeadConfig function. getHeadConfig takes in the provided data and will output a HeadConfig object which will be used to generate the tags inside the head tag of the generated HTML document. |
GetPath | The type definition for the template's getPath function. |
GetRedirects | The type definiton for the template's getRedirects function. |
HttpFunction | A function that runs when a specific path is visited on the site. |
Manifest | A manifest of bundled files present during a production build. |
Module | The type definition for the module's default function. |
OnUrlChangeFunction | A function that runs when the path of a production page changes. |
PagesOnUrlChangeResponse | onUrlUpdate plugins return void. |
Render | The type definition for the template's render function. |
TagType | Type that enumerates the allowed types of HTML elements in the document header. |
Template | The type definition for the template's default function. |
TransformProps | The type definition for the template's transformProps function. Can be used to alter and/or augement the props (which include the data document) passed into the template at render time. |