diff --git a/website/docs/api/docusaurus.config.js.md b/website/docs/api/docusaurus.config.js.md index d3031c90063d..8aaa3053124c 100644 --- a/website/docs/api/docusaurus.config.js.md +++ b/website/docs/api/docusaurus.config.js.md @@ -306,6 +306,50 @@ module.exports = { }; ``` +### `ssrTemplate` + +An HTML template that will be used to render your application. This can be used to set custom attributes on the `body` tags, additional `meta` tags, customize the `viewport`, etc. Please note that Docusaurus will rely on the template to be correctly structured in order to function properly, once you do customize it, you will have to make sure that your template is compliant with the requirements from `upstream`. + +- Type: `string` + +Example: + +```js title="docusaurus.config.js" +module.exports = { + ssrTemplate: ` +> + + + + + <%~ it.headTags %> + <% it.metaAttributes.forEach((metaAttribute) => { %> + <%~ metaAttribute %> + <% }); %> + <% it.stylesheets.forEach((stylesheet) => { %> + + <% }); %> + <% it.scripts.forEach((script) => { %> + + <% }); %> + + itemscope="" itemtype="http://schema.org/Organization"> + <%~ it.preBodyTags %> +
+ <%~ it.appHtml %> +
+
+ Custom markup +
+ <% it.scripts.forEach((script) => { %> + + <% }); %> + <%~ it.postBodyTags %> + + +}; +``` + ### `stylesheets` An array of CSS sources to load. The values can be either strings or plain objects of attribute-value maps. The `` tags will be inserted in the HTML ``.