A plugin for WordPress that provides oEmbed services for GitHub.
- Profiles
- Repositories
- Commits
- Pull Requests
- Issues
- Gists
All URL's support using both https
and http
, as well as with www.
or without www.
(Gists excluded)
https://github.com/{username}
https://github.com/{username}/{repository}
https://github.com/{username}/{repository}/commit/{commit}
https://github.com/{username}/{repository}/pull/{pull}/commits/{commit}
https://github.com/{username}/{repository}/pull/{pull}
https://github.com/{username}/{repository}/issues/{issue}
https://gist.github.com/{username}/{gist}
Note: This plugin is not yet available on the WordPress repository. These instructions are for once it has been approved.
- Visit ‘Plugins > Add New’
- Search for ‘oembed-github’
- Activate oEmbed Github from your Plugins page.
To manually install oEmbed Github download this repository as a zip file and unzip it into a folder named oembed-github
within your wp-content/plugins
directory. Once you are finished, visit your Plugins Page and activate the oEmbed Github plugin.
Final Directory Structure
.
-- wp-content
---- oembed-github
------ oembed-github.php
------ LICENSE
------ . . .
GitHub
#^((http(s|)):\/\/|)(www.|)github.com(\/)(([a-z0-9-?&%_=]*))((\/([a-z0-9-?&%_=]*))|)(\/([a-z0-9-?&%_=]*)|)(\/([a-z0-9-?&%_=]*)|)(\/([a-z0-9-?&%_=]*)|)(\/([a-z0-9-?&%_=]*)|)#i
Gist
#^((http(s|)):\/\/|)gist.github.com\/([a-z0-9-?&%_=]*)\/([a-z0-9-?&%_=]*)(\/|)#i
In order to avoid the GitHub API rate limit, you can provide your GitHub application Client ID
and Client Token
in the oEmbed Github
options area within your Wordpress Admin dashboard.
You can customize the theme of all embeded content from the oEmbed Github
options area within your Wordpress Admin dashboard.
This plugin makes use of gist-embed by Blair Vanderhoof
oEmbed Github is licensed under GPLv3 (See LICENSE)