When I try to embed gist in Medium it shows only the first 11 lines of the gist while code is longer inside gist. How can be this fixed?
If you want to publish it on medium, then you should save your gist as public. Copy the link to your gist (url) or get the sharable link. It can be embedded into Medium article by simply pasting it in a new line or using embed link option.
You need to go to the GitHub gist and write the code. Then, you need to paste the link in your Medium article. If you want to change the code, you can't do that inside Medium, but you have to go to GitHub Gist and update it. If you want to insert another Gist, then you need to repeat this process.
Embedding with a URL To quickly embed a Gist, simply copy the gist's URL from your web browser's address bar while viewing the gist. Paste it on a line by itself in your Visual editor. Make sure that it is not hyperlinked.
In the top right corner of your gist page, there will be a menu that allows for multiple functions to be performed on your gist. We can edit, delete, unsubscribe, star, embed, copy, share, and download a raw copy or zipped copy of a gist.
Medium have said in their Twitter suppport feed that it's an issue that only affects the editor but it should look fine when published.
https://twitter.com/MediumSupport/status/1201827439632158725
To embed a Tweet, Instagram video, or more on Medium, all you need to do is to paste the URL into the Medium editor, and press Enter to convert that link into an embed.
As per the medium guide, you just have to paste the gist embed URL into the Medium editor (without the script tag), and press Enter. It'll convert into an embed code segment on the editor itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With