-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added og:image and alt text checks to linter for Stories #755
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
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.
Thanks! Looks good. Left a few comments (mostly nits). Can you please add tests as well.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
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.
Looks good! Few nits.
? this.warn(`Missing og:image property or content source`) | ||
: this.pass(); | ||
} | ||
meta() { | ||
return { | ||
url: | ||
"https://html.spec.whatwg.org/multipage/parsing.html#determining-the-character-encoding", | ||
url: "https://ogp.me/", |
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.
Would it besser to link to a stories specific documentation page?
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 can swap it for the SEO for Stories post
packages/linter/tests/local.ts
Outdated
@@ -102,5 +104,31 @@ assertWarn( | |||
runLocalTest(BookendExists, "local/BookendExists-3/source.html") | |||
); | |||
|
|||
assertPass( | |||
`${MetadataIncludesOGImageSrc.name} - <meta property="og:image"> is presentt`, |
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.
typo: s/presentt/present
<meta property="og:image:height" content="1920"> | ||
<meta name="twitter:card" content="summary_large_image"> | ||
<link rel="canonical" href="https://onl.st/linter-tester"> | ||
<style amp-custom> |
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.
Can you clean up this file and remove everything that is not relevant for the test (e.g. CSS)
<meta name="twitter:card" content="summary_large_image"> | ||
<link rel="canonical" href="https://onl.st/linter-tester"> | ||
<style amp-custom> | ||
.pbvnsupp amp-img.pbvnsup>img { |
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.
Same as above, cleanup. the file
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
I've manually verified the CLA (@Dbrown910 is a Googler) |
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.
Great - thanks!
Initial updates to linter as apart of Linter UI project