Skip to content

WordPress plugin which adds your favorite GitHub repositories as a embed block to the block editor - with GitHub access token

License

Notifications You must be signed in to change notification settings

kianwasabi/Embed_Block_for_Github-Wordpress_Plugin

 
 

Repository files navigation

Embed Block for GitHub

This WordPress plugin easily adds your favorite GitHub projects as an Embed Block to the Gutenberg Block Editor.

Forked & Modified version of the "embed-block-for-github"

How to use:

  1. Create your personal GitHub access token.
  2. Download this repository as a .zip file.
  3. Install the plugin and activate it in WordPress.
  4. Insert the "GitHub Repo Block".
  5. Go to the editor and choose GitHub Repo block.
  6. Add the URL of the repository & your GitHub token and see the magic happen.
  7. Embed your GitHub Repositories in your Post content.

Stuff to fix&modify:

  • Unfortunately, the original version has some issues which needed to be fixed. Therefore, the plugin has been modified regarding the points shown below.

FIX API RATE LIMIT EXCEEDED & REMOVE DARKMODE

  • The issue comes from the way how GitHub counts requests for rate limit. For unauthorized requests, it is limited by IP address as shown in the picture below.
  • Additionally, I don't see the need for having a "dark mode" option in the plugin.

FIX LINKS NOT CLICKABLE & REMOVE AVATAR

  • Links on the card are not clickable!
  • Moreover, I believe that an avatar shown on the card is a nice gimmick but not essential.

>

Concept & Result:

FIX API RATE LIMIT EXCEEDED , REMOVE DARKMODE & REMOVE AVATAR

  • Use authorized API requests at the GitHub API through personalized bearer access tokens. (see: WordPress Auth & GitHub rate limit)
  • In Addition, the plugin's inspector needed an extra text field to enter the personalized access token.

MAKE CLICKABLE LINKS

  • Issue was already solved in a pull request but never merged to the master branch.

Status:

Works fine. Potential for enhancements - Open for contributions.

Author:

  • Kian Wasabi

About

WordPress plugin which adds your favorite GitHub repositories as a embed block to the block editor - with GitHub access token

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 57.4%
  • JavaScript 21.9%
  • CSS 20.7%