Gutenberg: Add Block: Gist

Created on 28 Jun 2017  路  16Comments  路  Source: WordPress/gutenberg

Most helpful comment

A Gist block has been added to this plugin:
https://wordpress.org/plugins/coblocks/

All 16 comments

How many people would use this?

I could swear there was a ticket on Trac for adding this to core. It was probably closed because it's not an oEmbed provider. There are some plugins though that add support for embedding gists, e.g. https://wordpress.org/plugins/oembed-gist/ with 2000 installs.

I would :)

I think many users coming from Medium could use it too, it's the default way of inserting code content in Medium.

I actually think a lot of different writers would. From devs to support and how to posts. Gists are even used to share text.

Can we then at least add this to WordPress core as an embed provider as well? So people can get used to it.

This should definitely be as a part of the oEmbed in Core, rather than just a block in the Editor.

Will note that Jetpack also adds support for embedding Gists, but uses the JavaScript-embed method (the file comment explains).

I would use it too. I have seen many many folks using it to version their code snippets!

I just opened a Trac ticket for it: https://core.trac.wordpress.org/ticket/41206

There's a PoC patch attached with some code borrowed from Jetpack (yay open source!)

You are adding to much things just beacuse you want majority of people to start loving Gutenberg.

Something so complex like Gutenberg (will be) has to have dedicated settings page under "Settings" and Role based configuration. Like Drupal has it to for years.

I do not mind 300 blocks as Admin/Developer. Actually I always like it more it is.
But somehow sense it will be hard work to keep track on all custom PHP snippets just for Gutenberg. Or React snippets, what is worse.

And this story is very funny from retro-perspective seen. All small things, feature requests, we for years asked on Trac, response was always the same, same day, as automated email answer. It is "plugin teritory". Now you are playful like kids.

@StaggerLeee this is a plugin, so it is plugin territory :)

Whenever a merge proposal is made, we'll discuss what makes sense to keep, and what should be transformed into plugins.

As the project moves towards merge proposal, we are moving issues that aren't needed for that to projects. This doesn't mean they won't get done, they totally can and that's why we're moving to projects. This allows us to focus on the issues that have to happen to Gutenberg. I am closing this but it will live in projects.

+1 for gists or any other quick code/documentation blocks. Excellent idea.

Currently adding gist via oEmbed gist plugin and converting the block in Gutenberg to HTML.

A Gist block has been added to this plugin:
https://wordpress.org/plugins/coblocks/

Can we please reopen this issue to create some focus on this again? As it looks like there is still not a method in Gutenberg core to embed gists.
@mtias

@richtabor
@phpbits
I am pinging Rich and Jeffrey as well as I believe they would be able to help get this feature into core.

Comment made by @youknowriad when I brought up this issue during a core editor chat.
"...the issue is that AFAIK Github doesn't support OEmbed as far as I know."
"If we were to support it, it would be a custom block using Github custom APIs which is not something we did in Core previously."

As a tutorial creator I find it very useful to create gists and then share the gist in my tutorials.

I e-mailed Github once again.
I am hoping that this time there can be some movement on either having Github support OEmbed or that another solution for adding a Gist Core Block can show up.

I came across this older plugin by Daniel @danielbachhuber
https://github.com/pantheon-systems/github-gist-gutenberg-block/

As I am experimenting. I am noticing by adding a HTML block and pasting in the Gist Embed link. Then selecting Preview. That the Gist shows up in the backend and frontend.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

pfefferle picture pfefferle  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments