Title: GitSwag
Author: kennethrapp
Published: <strong>December 30, 2013</strong>
Last modified: June 13, 2014

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/gitswag.svg)

# GitSwag

 By [kennethrapp](https://profiles.wordpress.org/kennethrapp/)

[Download](https://downloads.wordpress.org/plugin/gitswag.zip)

 * [Details](https://wordpress.org/plugins/gitswag/#description)
 * [Reviews](https://wordpress.org/plugins/gitswag/#reviews)
 *  [Installation](https://wordpress.org/plugins/gitswag/#installation)
 * [Development](https://wordpress.org/plugins/gitswag/#developers)

 [Support](https://wordpress.org/support/plugin/gitswag/)

## Description

GitSwag displays data from a Github account using Github’s public API. In order 
to avoid
 rate-limiting, it caches the JSON from the API locally, and refers to 
that whenever available. You can display a user profile, list of repositories, header
for a single repository, preview files or gists.

### Administration

In “GitSwag” under the settings tab, enter your github username, select the
 “update
cache” checkbox and submit to change your username. Files under that username can
be deleted by checking the box next to the file and submitting.

Any changes you make to your github repo won’t be reflected immediately by
 the 
plugin, you’ll have to manually delete the cache first.

### Composer Updating

This plugin includes [http://getcomposer.org](https://wordpress.org/plugins/gitswag/Composer?output_format=md)
and an autoloader to implement
 the [http://parsedown.org/](https://wordpress.org/plugins/gitswag/Parsedown?output_format=md)
library.

To save a bit of space, composer.phar isn’t included with this plugin.

Parsedown is [https://github.com/erusev/parsedown/blob/master/LICENSE.txt](MIT licensed)

### Shortcode

Display the profile of a single user
 [gitswag_user_view github_username=”username”]

Display a list of repos for a user
 [gitswag_repo_list github_username=”username”]

View data for a repository
 [gitswag_repo_view github_username=”username” github_repo
=”reponame”]

Preview a file
 [gitswag_file_view github_username=”username” github_repo=”reponame”
path=”path/to/” filename=”file.txt”]

List gists by a user
 [gitswag_gist_list github_username=”username”]

Preview a gist
 [gitswag_gist_view gist_id=”id”]

display the readme for a repo
 [gitswag_readme github_username=”username” github_repo
=”reponame”]

### Administration

Because the public github API is rate limited, this plugin will download and keep
a cached
 version of the .json files and readme markdown from API calls locally,
and will need to be deleted in the admin panel when a change needs to be reflected.
You can select a file and submit to delete them.

## Screenshots

[⌊user profile⌉⌊user profile⌉[

user profile

[⌊repo file view⌉⌊repo file view⌉[

repo file view

[⌊repo list view⌉⌊repo list view⌉[

repo list view

## Installation

 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Add some shortcodes.

## FAQ

  Can I clone/pull/push/whatever?

..no. Nothing that requires authentication is supported.

  what’s to stop me from getting the data from someone else’s repo?

..nothing. It’s all public data anyway. Be nice.

  this is missing an api feature

I’ll probably get around to it at some point.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“GitSwag” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ kennethrapp ](https://profiles.wordpress.org/kennethrapp/)

[Translate “GitSwag” into your language.](https://translate.wordpress.org/projects/wp-plugins/gitswag)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/gitswag/), check out
the [SVN repository](https://plugins.svn.wordpress.org/gitswag/), or subscribe to
the [development log](https://plugins.trac.wordpress.org/log/gitswag/) by [RSS](https://plugins.trac.wordpress.org/log/gitswag/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

1.2 added output buffering and changed echoes to returns, fixing possible rendering
issues. updated css.
 1.1 bugfix

1.0 works

## Meta

 *  Version **1.2**
 *  Last updated **12 years ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 3.2 or higher **
 *  Tested up to **3.7.41**
 * Tag
 * [Github](https://wordpress.org/plugins/tags/github/)
 *  [Advanced View](https://wordpress.org/plugins/gitswag/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/gitswag/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/gitswag/reviews/)

## Contributors

 *   [ kennethrapp ](https://profiles.wordpress.org/kennethrapp/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/gitswag/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=92XWZSS88YF9C)