From 277f02b9241f40b376e4a69742398fc38f27e550 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sat, 6 Jun 2020 11:51:00 +0300 Subject: [PATCH] fix(v2): set correct canonical url for docs home page (#2896) --- packages/docusaurus-theme-classic/src/theme/DocPage/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/docusaurus-theme-classic/src/theme/DocPage/index.js b/packages/docusaurus-theme-classic/src/theme/DocPage/index.js index 397fecd22784..fe3ef2767d16 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocPage/index.js +++ b/packages/docusaurus-theme-classic/src/theme/DocPage/index.js @@ -44,6 +44,10 @@ function DocPage(props) { isClient, } = useDocusaurusContext(); + if (isHomePage) { + content.metadata.permalink = homePagePath; + } + if (!isHomePage && Object.keys(currentRoute).length === 0) { return ; }