Skip to content

Commit

Permalink
fix(v2): set correct canonical url for docs home page
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 committed Jun 6, 2020
1 parent 1003a15 commit ded2d6a
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 ded2d6a

Please sign in to comment.