-
Notifications
You must be signed in to change notification settings - Fork 296
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
Configure default Twitter summary card type (V2) #225
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
82e8d32
Update usage.md
BlythMeister 2f804fd
Add twitterCardType
BlythMeister 06a77d8
Update logic to use twitter_image_small flag
BlythMeister 803c6e1
Update usage for twitter_image_small
BlythMeister 3890d50
Fix issue in template with twitter_image_small
BlythMeister 728b2e9
Merge branch 'master' into TwitterCard2
benbalter 8835d78
Merge branch 'master' into TwitterCard2
DirtyF 3f6ece6
Update template following code review
BlythMeister f9a59f6
Update usage following code review
BlythMeister 8497fab
Update twitter config example
BlythMeister 31ee52f
Merge branch 'master' into TwitterCard2
DirtyF File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Per the discussion over in #222 (comment), would it make more sense to implement this as something like:
That way if Twitter adds a "medium" card next year, we're still covered.
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 did try this and whilst I agree it does add future scope, the usage in the consuming site doesn't look/feel as nice as a true/false.
If adding as discussed with defaults is the only way to get this in, then I guess I concede, but imo, code should be implemented for the current scope, not all possible future scope 🙂
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.
Not strongly opinionated. If others feel strongly one way or the other, glad to support the consensus.
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.
My other theory is, with this, users don't need to know the names Twitter use, they can see in the docs here there is a true/false to make it small.
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.
There are already other types of cards (
app
andplayer
for now): https://dev.twitter.com/cards/types. We might as well support those.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.
App and player cards require other meta data info rather than just the image, do there is quite a bit more effort required.
For a simple image based card which is what this section has, there is just small or big image.
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.
Having been 6 months on this...is the only way to get this in to force the user to put the exact card type into their front matter?
To repeat why I went with this approach, Twitter has 2 card types that would work with the rest of the meta this plugin adds.
By using a Boolean option, the user doesn't need to know the exact twitter card names (which is one plus for this whole plugin, the user doesn't need to know all the meta tags)
I would appreciate a definite change to get in, or a merge as is so this can move forward please.
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.
The boolean seems clunky. Ie: Why
twitter_image_small: true
instead oftwitter_image_large: false
?Let's go with
twitter.card: summary_large_image
👍