Author: James Barnden
Lightweight widget shortcodes to display GitHub buttons and gists on your blog. Includes shortcode for embedding GitHub hosted gists and buttons for:
- Follow
- Watch
- Star
- Fork
- Download
- Issue
The plugin implements ntkme's 'github-buttons' and GitHub's gist display as shortcodes.
- Upload the
widget-shortcodes-gh
directory to your plugins directorywp-content/plugins
. - Activate the plugin through the 'Plugins' menu in WordPress
Add the [Github_User_Button user='JBarnden']
shortcode in your content and replace JBarnden
with the desired GitHub username.
size
: makes the button slightly bigger, can be set tolarge
orsmall
. Default value issmall
.show_count
: show current number of followers, can be set totrue
orfalse
. Default value is false.
[Github_User_Button user='JBarnden' size='large' show_count='true']
Add the [Github_Repo_Button user='JBarnden' repo='MyRepo']
shortcode in your content, replacing JBarnden
with the desired GitHub username and MyRepo
with the desired repo belonging to the specified user.
type
: changes button behaviour/type, can be set towatch
,star
,fork
,issue
ordownload
. Default value isstar
.size
: makes the button slightly bigger, can be set tolarge
orsmall
. Default value issmall
.show_count
: show current number of followers, can be set totrue
orfalse
. Default value is false.icon
: can be used to set the icon to standard GitHub icon, can be set tostandard
ortype_default
. Default value istype_default
.
[Github_Repo_Button user='JBarnden' repo='wp-github-widgets' size='large' show_count='true']
Add the [Gist]gist_id[/Gist]
where gist_id
is replaced with the id of the desired Gist.
[Gist]cee89b8a3600c50b7e50fa4870403069[/Gist]
Please submit feature requests and contributions via the issues section of the Repository. If you feel like improving the plugin, pull requests are both welcome and appreciated.