How to embed github files on wordpress? no gists

How can I easily embed code via GitHub on my wordpress page without copy and past git gist? Full git files of one repo I want to publish. No snippet.

Is this possible?

1 Like

Hi @liquid-idea,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.

Additionally, you might want to supply a bit more context for why you want to do this. Talking about the project as a whole might allow you to get recommendations that meet your goal, even if this specific implementation isn’t easily possible.

Let me know if you have any other questions or if I can help with anything else.

Cheers!

1 Like

Hi

I just sent a request for Github to support OEmbed as it would make it a lot easier to embed Gists directly into WordPress. Now that Gutenberg is out Embedding a Gist could be as simple as just pasting in the Gist URL and having it automatically show up.

See also this Gutenberg issue:

https://github.com/WordPress/gutenberg/issues/17054

WordPress is a very large CMS having a simple way to show gists in the new Core Editor called Gutenberg would be very helpful for various users and will likely also help promote the use of Github gists.

How is the progress of this feature coming along?

Using a browser, navigate to the “raw” version of a source file in your repository. The resulting URL is one you can use anywhere.

It’ll be something like:

https://raw.githubusercontent.com/<user>/<repo>/master/<folder>/<folder>/<sourcefile>