From e39e489ca1bfe847f9b796e7b463d9fa434987dc Mon Sep 17 00:00:00 2001 From: amaan-bhati Date: Tue, 16 Jun 2026 16:56:14 +0530 Subject: [PATCH] fix(docitem): render frontMatter.head tags so custom canonicals reach built HTML Signed-off-by: amaan-bhati --- src/theme/DocItem/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/theme/DocItem/index.js b/src/theme/DocItem/index.js index 37371d877..9e040ed8d 100644 --- a/src/theme/DocItem/index.js +++ b/src/theme/DocItem/index.js @@ -237,6 +237,12 @@ export default function DocItem(props) { {JSON.stringify(articleSchema)} )} + {Array.isArray(frontMatter.head) && + frontMatter.head.map((headTag, i) => { + if (!headTag?.tag) return null; + const {tag: tagName, attrs = {}} = headTag; + return React.createElement(tagName, {key: i, ...attrs}); + })}