-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rich snippets via <script type="application/ld+json"> #5
Comments
@nicooprat This is the well known alternative to schema.org markup. |
At least lest pick a proper property name:
WDYT? |
Glad to hear! Would it be possible to reuse the
Something more modular that could cover other use cases that we don't think of at the moment I guess... |
Thanks to @nicooprat This commit adds support for `innerHTML` property which will fill element with content instead of creating attribute. Allowing to use with cases like `application/ld+json` manifest
- Compatibility with `[email protected]` - Implement #5 , thanks to @nicooprat - Dependencies update - Docs are updated - More tests, 100% tests coverage, now with `ld+json`
Hello @nicooprat , This was implemented in Let me know if it works well for you |
Should we close this one too? |
Couldn't test it for now, but I guess it's ok. For me the real ✅ would be if I can make it work with a prerendering service in order to make Facebook & Google crawlers see its content. |
We use schema.org markup works well for us. Is there any benefits using |
Last time I worked with rich snippets, schema.org was the preferred way. Now it looks like they changed their mind, so the first advantage would be to be sure it isn't obsolete in the next few months/years: I guess depending on the context it's easier to include all datas in one script, or to embed it in each component... |
@nicooprat Could you drop me a link on the working website where it is fully implemented, wondered to test it with different crawlers. |
Didn't implemented it on mine for now! Can't find a website which has implemented it on itself, only websites providing some code examples... |
Same here, okay, drop it here if you will find one. I'll do the same. |
Finally had time this morning to test FlowRouter.route('/@:username', {
script: {
BreadcrumbList: {
type: 'application/ld+json',
innerHTML({username}) {
const author = Users.find({username}).fetch()[0]
return author && JSON.stringify({
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": author.getPath(),
"name": author.profile.name,
}
}]
})
}
}
}
}) Unfortunately the function runs only once. |
@nicooprat as I've mentioned here:
It applies to all options at this "meta" package. As always I'm sorry if this breaks your implementation :( |
Yeah, sorry already forgot that. Indeed I'm seeing that component based subscriptions can create some unexpected issues like this. I'll try to use Thanks again for your work :) |
Thank you for using it :)
Closing in favor of veliovgroup/spiderable-middleware#4 (comment) Feel free to reopen it. |
Looks like the new preferred way to structure datas is to add a special script like this: https://developers.google.com/search/docs/guides/intro-structured-data
Can't see anything in the docs that could do that. Any idea or workaround?
It seems that (deprecated?) package
dochead
had a way to do it by the way: https://github.com/kadirahq/meteor-dochead#docheadaddldjsonscriptjsonobjThe text was updated successfully, but these errors were encountered: