Skip to content

Commit

Permalink
feat(v2): add canonical URL to <head> (#2694)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcomack authored May 13, 2020
1 parent 7d8aeac commit aac4e27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function DocItem(props) {
<meta name="twitter:image:alt" content={`Image for ${title}`} />
)}
{permalink && <meta property="og:url" content={siteUrl + permalink} />}
{permalink && <link rel="canonical" href={siteUrl + permalink} />}
</Head>
<div
className={classnames(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function Layout(props) {
{permalink && (
<meta property="og:url" content={siteUrl + permalink} />
)}
{permalink && <link rel="canonical" href={siteUrl + permalink} />}
<meta name="twitter:card" content="summary_large_image" />
</Head>
<AnnouncementBar />
Expand Down

0 comments on commit aac4e27

Please sign in to comment.