-
Notifications
You must be signed in to change notification settings - Fork 78
Adding BreadcrumbList schema.org spec #119
base: master
Are you sure you want to change the base?
Conversation
@poteto Is there no CI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.environment
2. use the current solution and find and alternative place to reopen the
LinkComponent
https://developers.google.com/search/docs/data-types/breadcrumbs
http://schema.org/BreadcrumbList
output from
foo/bar/baz
routeValidate the output here https://search.google.com/structured-data/testing-tool
@trabus thanks for your help!!