Title: GitSwag
Author: kennethrapp
Published: <strong>2013 年 12 月 30 日</strong>
Last modified: 2014 年 6 月 13 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

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

# GitSwag

 由 [kennethrapp](https://profiles.wordpress.org/kennethrapp/) 開發

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

 * [詳細資料](https://tw.wordpress.org/plugins/gitswag/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/gitswag/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/gitswag/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/gitswag/#developers)

 [技術支援](https://wordpress.org/support/plugin/gitswag/)

## 外掛說明

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://tw.wordpress.org/plugins/gitswag/Composer?output_format=md)
and an autoloader to implement
 the [http://parsedown.org/](https://tw.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.

## 螢幕擷圖

[⌊user profile⌉⌊user profile⌉[

user profile

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

repo file view

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

repo list view

## 安裝方式

 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.

## 常見問題集

  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.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈GitSwag〉的開發相關工作。

參與者

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

[將〈GitSwag〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/gitswag)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/gitswag/)、查看
[SVN 存放庫](https://plugins.svn.wordpress.org/gitswag/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/gitswag/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/gitswag/)。

## 變更記錄

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

1.0 works

## 中繼資料

 *  版本 **1.2**
 *  最後更新 **12 年前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 3.2 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.7.41**
 *  語言
 * [English (US)](https://wordpress.org/plugins/gitswag/)
 * 標籤:
 * [Github](https://tw.wordpress.org/plugins/tags/github/)
 *  [進階檢視](https://tw.wordpress.org/plugins/gitswag/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/gitswag/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/gitswag/reviews/)

## 參與者

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

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/gitswag/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=92XWZSS88YF9C)