mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-25 20:29:45 -04:00
Merge pull request #3375 from LLK/canonical-link
Include canonical link in project meta tags
This commit is contained in:
commit
e2e9bb8db3
1 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,7 @@ const Helmet = require('react-helmet').default;
|
|||
const projectShape = require('./projectshape.jsx').projectShape;
|
||||
|
||||
const Meta = props => {
|
||||
const {title, instructions, author} = props.projectInfo;
|
||||
const {id, title, instructions, author} = props.projectInfo;
|
||||
|
||||
// Do not want to render any meta tags unless all the info is loaded
|
||||
// Check only author (object) because it is ok to have empty string instructions
|
||||
|
@ -29,6 +29,10 @@ const Meta = props => {
|
|||
content={truncatedInstructions}
|
||||
property="og:description"
|
||||
/>
|
||||
<link
|
||||
href={`https://scratch.mit.edu/projects/${id}`}
|
||||
rel="canonical"
|
||||
/>
|
||||
</Helmet>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue