mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 16:29:47 +02:00
feat(v2): add canonical URL to <head> (#2694)
This commit is contained in:
parent
7d8aeacf52
commit
aac4e27a90
2 changed files with 2 additions and 0 deletions
|
@ -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(
|
||||
|
|
|
@ -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 />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue