-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microdata (schemas) support #17
Comments
Hey @infoxicator, what exactly did you have in mind when you say microdata? Are you referring to stuff like |
Yeah that's it 👍 |
Ok cool, YIL/TIL about this pattern for adding schema.org data to a web page. I also agree that Schema.org data would be a great addition to this library. I am curious how search engines interpret the "microdata" approach vs "json/ld" scripts: <!-- 'microdata' -->
<html>
<body>
<div itemscope itemtype ="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span>
<span itemprop="genre">Science fiction</span>
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>
</body>
</html> <!-- 'json/ld' -->
<html>
<head>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Movie",
"name": "Avatar",
"director": {
"@type": "Person",
"name": "James Cameron"
},
"genre": "Science fiction",
"trailer": {
"@type": "VideoObject",
"contentUrl": "../movies/avatar-theatrical-trailer.html"
}
}
</script>
</head>
<body>
<div>
<h1>Avatar</h1>
<span>Director: James Cameron (born August 16, 1954)</span>
<span>Science fiction</span>
<a href="../movies/avatar-theatrical-trailer.html">Trailer</a>
</div>
</body>
</html> It seems like Curious to hear @jgolden17's thoughts on supporting schema.org data in this library. It seems like it'd be relatively minimal effort to include a |
I'm all for including |
As far as microdata is concerned, I've been thinking about this on and off. I haven't been able to figure out a clean solution short of exposing some kind of
Google seems to prefer structured data as |
@pcooney10 I wasn't familiar with |
It looks like schema-dts may be a great library for autocompletion/TypeScript support for schemas supported on schema.org. Maybe integrating react-helmet in combination with schema-dts would be a good way to integrate with react-seo. Here is an example of the combination from react-schemaorg: helmet + schema-dts. |
+1 |
Using microdata is a recommended practice to boost SEO https://schema.org/docs/gs.html
The text was updated successfully, but these errors were encountered: