Skip to content

Commit

Permalink
Fix alternate lang tags (#3)
Browse files Browse the repository at this point in the history
* Fix alternate lang tags

* prettier

* Scope down the change

---------

Co-authored-by: Dan Abramov <[email protected]>
  • Loading branch information
rickhanlonii and gaearon authored Apr 17, 2023
1 parent 7863b5b commit 9deda00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/TitleAndMetaTags/TitleAndMetaTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const alternatePages = canonicalUrl => {
};

const defaultPage = canonicalUrl => {
return canonicalUrl.replace(urlRoot, 'https://reactjs.org');
return canonicalUrl.replace(urlRoot, 'https://legacy.reactjs.org');
};

const TitleAndMetaTags = ({
Expand All @@ -57,7 +57,10 @@ const TitleAndMetaTags = ({
<meta property="og:title" content={title} />
<meta property="og:type" content={ogType} />
{canonicalUrl && <meta property="og:url" content={canonicalUrl} />}
<meta property="og:image" content="https://reactjs.org/logo-og.png" />
<meta
property="og:image"
content="https://legacy.reactjs.org/logo-og.png"
/>
<meta
property="og:description"
content={ogDescription || defaultDescription}
Expand Down
2 changes: 1 addition & 1 deletion src/site-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// NOTE: We can't just use `location.toString()` because when we are rendering
// the SSR part in node.js we won't have a proper location.
const urlRoot = 'https://reactjs.org';
const urlRoot = 'https://legacy.reactjs.org';
const version = '18.2.0';
const babelURL = 'https://unpkg.com/[email protected]/babel.min.js';

Expand Down

0 comments on commit 9deda00

Please sign in to comment.