[WordPress] 外掛分享: GitSwag

首頁外掛目錄 › GitSwag
全新外掛
安裝啟用
尚無評分
4298 天前
最後更新
問題解決
WordPress 3.2+ v1.2 上架:2013-12-29

內容簡介

GitSwag使用Github的公共API來顯示Github帳戶的數據。為了避免被限制速率,它會在本地緩存API的JSON數據,並在可以的情況下使用該緩存。您可以顯示用戶資料、存儲庫列表、單個存儲庫的標頭、預覽文件或要點。

管理

在“GitSwag”的設置選項卡中,輸入您的Github用戶名,選擇“更新快存”勾選框,並提交以更改您的用戶名。可以通過勾選文件旁的框並提交來刪除該用戶名下的文件。

插件不會立即反映對您的Github存儲庫進行的任何更改,您需手動刪除緩存。

Composer更新

此外掛包含http://getcomposer.org 和自動加載器來實現http://parsedown.org/庫。

為節省空間,未包括composer.phar。

Parsedown是以MIT授權發布的。

短代碼

顯示單個用戶的個人檔案
[gitswag_user_view github_username=”username”]

顯示用戶的存儲庫列表
[gitswag_repo_list github_username=”username”]

顯示存儲庫的數據
[gitswag_repo_view github_username=”username” github_repo=”reponame”]

預覽文件
[gitswag_file_view github_username=”username” github_repo=”reponame” path=”path/to/” filename=”file.txt”]

列出用戶的要點
[gitswag_gist_list github_username=”username”]

預覽要點
[gitswag_gist_view gist_id=”id”]

顯示存儲庫的README文檔
[gitswag_readme github_username=”username” github_repo=”reponame”]

管理

由於Github的公共API受限制,因此此插件將從API調用中下載和保持.json文件和README標記的緩存版本,當需要反映更改時,需要在管理面板中刪除它們。您可以選擇文件並提交以刪除它們。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「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 and an autoloader to implement
the http://parsedown.org/ 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.

延伸相關外掛

文章
Filter
Mastodon