-
Notifications
You must be signed in to change notification settings - Fork 25
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
Adds examples of oembed parameters #38
Conversation
I am liking this. Let's start with adding it to the config and let it be a global setting. We can add the possibility of overriding settings on a link later. Remember to update docs and add tests as you see fit. |
Let me know if you are stuck in any way (other than lack of time, can't help you there...). |
…object to provider object
@raae Thanks for the prompt, I have been meaning to reach out because I did get stuck! I don’t have a lot of experience with I pushed the earlier commits, and I added some better tests, but still tripping up here:
You can use it with the regular config and everything works as normal. |
I will have a look at it tomorrow morning, I am on GMT+1 (Oslo) time. |
Hey, I made it work! You can see it in my kennethormandy-ko-config-demo branch. If you give me access to your fork I can push it there and we keep it all in this pull request. I moved the added settings out of include as one might want to add these settings without limiting the provider list. So your example config would now be:
|
Great thinking, that solves both problems. I didn’t think about someone wanting to keep all the default providers and still add settings, that’s a good change. I gave you access to the fork, but I will also try cherry picking your commit, and then I can update the docs. |
Great, cherry-pick away. I have time this weekend to look over final code and merge :D |
Got the flu and ome work stuff getting in the way. Will hopefully get to is soon. |
@raae Thanks for letting me know, and hope you feel better quickly! I’m happy using the fork with your updates for now, and can easily switch to a new version when you have a more convenient block of time to review this. |
Woke up too early, so this happened 👍 |
Send me your address on twitter DM (@raae) and I'll hook you up with some Norwegian chocolate 🍫 |
Just a reminder of the above @kennethormandy 🍫 📫 |
Hi, thanks for your work on this plugin, it’s working really well for me!
Before I went too far with this, I was wondering what you thought about adding support for configuring individual oEmbed providers? As far as I could tell, this isn’t possible with the current plugin, although if I’ve missed something just let me know.
I’ve hard-coded a Twitter example in
helpers.js
just as an easy way to try this idea out, but I would expect you would manually do something like this in yourgatsby-config.js
:On Twitter, this will let you configure some of the parameters you would normally change through
data-*
attributes, which of course don’t make sense here, because the HTML is generated for you. Another API I could imagine:Or related to #23:
Presumably, this would let you configure the settings for each individual embed, if you wanted something different between them. Personally, my use case would be solved with the global settings in
gatsby-config.js
, but I could see this being useful too.Looking forward to hearing what you think.