Skip to content

Commit

Permalink
fix(v2): set correct canonical url for docs home page (#2896)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Jun 6, 2020
1 parent 36cf2ec commit 277f02b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/docusaurus-theme-classic/src/theme/DocPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ function DocPage(props) {
isClient,
} = useDocusaurusContext();

if (isHomePage) {
content.metadata.permalink = homePagePath;
}

if (!isHomePage && Object.keys(currentRoute).length === 0) {
return <NotFound {...props} />;
}
Expand Down

0 comments on commit 277f02b

Please sign in to comment.