-
Notifications
You must be signed in to change notification settings - Fork 669
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
Twitter cards #375
Twitter cards #375
Conversation
Merge changes from source repository
Wow, this is a very good solution. |
Codecov Report
@@ Coverage Diff @@
## master #375 +/- ##
==========================================
+ Coverage 97.61% 97.68% +0.06%
==========================================
Files 35 35
Lines 168 173 +5
Branches 9 10 +1
==========================================
+ Hits 164 169 +5
Misses 4 4
Continue to review full report at Codecov.
|
I forgot to update the tests. I've pushed a quick fix, but I must admit. I don't have a lot of experience writing such tests. Be nice if you could take a look @alxshelepenok I'll fix the linting errors :). |
I'm a little confused by the linting errors. I'm currently getting the following for the Layout.js file,
If you look at Sidebar.js from the master branch it seems to be formatted the same, but without triggering an error. So I'm a little confused what I've done wrong. |
@alehel if the number of props is more than 3
|
@alxshelepenok ah, I see. Thanks, I'll fix it now. I tried running 'yarn lint' before I pushed these changes. However I never got any of these errors. Just a bunch of errors about the linebreak being CRLF, which gets fixed by git anyway. Is there something I need to do to get this command to run correctly on Windows? |
@alehel strange, my preffered os is Fedora Linux, so I didn’t notice it. |
@alxshelepenok thanks, I got linting working locally by adding I'm now getting the expected linting errors. I guess the large number of CRLF errors were preventing the actual issues from surfacing in the terminal. Looks like all linting issues are fixed now. |
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.
@alehel Thanks! It will not be superfluous to add an image for an open graph
|
||
return ( | ||
<div className={styles.layout}> | ||
<Helmet> |
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 also recommend adding an image for open graph
<meta property="og:image" content={metaImageUrl} />
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.
Fixed 👍
Excellent thank you! |
Description
Currently Twitter cards don't contain a lot of information. This PR improves the look of these cards.
Twitter card with current code
Twitter card with this PR
You define the image used in the card by defining the socialImage tag in the md file for a page. If it hasn't been defined, we fall back to using your photo.jpg file. The twitter card description uses the existing description tag in the md file.
I've also updated the sample md files with the socialImage tag.
Related Issues
Related to #350