Adding BreadcrumbList schema.org spec#119
Conversation
|
@poteto Is there no CI? |
kiwiupover
left a comment
There was a problem hiding this comment.
I will update the readme when this is ready to land and we have a final API.
Cheers
|
|
||
| init() { | ||
| this._super(...arguments); | ||
| const hasSchema = get(this, 'breadCrumbs.hasSchema'); |
There was a problem hiding this comment.
We need to do this in two places we could move it a mixin.
| {{#if hasBlock}} | ||
| {{yield this route}} | ||
| {{else}} | ||
| {{#if hasSchema}} |
There was a problem hiding this comment.
We could make one more component to clean up this level of nest ifs
| {{else}} | ||
| {{route.title}} | ||
| {{/if}} | ||
| {{#link-to route.path class=linkClass itemscope=true itemtype="http://schema.org/Thing" itemprop="item"}} |
There was a problem hiding this comment.
FYI These attrs it the link-to with not be compiled if we don't reopen the LinkComponent
Have you thought about using the href-to addon here?
| init() { | ||
| this._super(...arguments); | ||
|
|
||
| LinkComponent.reopen({ |
There was a problem hiding this comment.
We need to reopen the LinkComponent to add attributeBindings but need to do this behind the hasSchema flag. However that is too late in the code execution path.
Also to make this backward compatible we need a version flag to switch to LinkView in pre 2.10 apps.
Do you have thoughts about?
We could move the configuration to the ENV and reopen the LinkComponent in the initializer
Closes #118
Usage:
TODO
1. use the
config.environment2. use the current solution and find and alternative place to reopen the
LinkComponenthttps://developers.google.com/search/docs/data-types/breadcrumbs
http://schema.org/BreadcrumbList
output from
foo/bar/bazrouteValidate the output here https://search.google.com/structured-data/testing-tool
@trabus thanks for your help!!