前言介紹
- 這款 WordPress 外掛「WP Github Commits」是 2013-02-11 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2021-10-13,距離現在已有 1299 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
- 有 2 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
sudar |
外掛標籤
內容簡介
此外掛在側邊欄顯示 Github 存儲庫的最新提交。
功能
側邊欄小工具
此外掛提供一個側邊欄小工具,可以配置以在側邊欄中顯示 Github 存儲庫的提交。您可以擁有多個不同配置存儲庫的小工具。
模板函數
除了使用小工具之外,您還可以使用以下模板函數在主題的任何位置顯示 Github 存儲庫的提交
get_github_commits($user, $repo, $count);
以下選項可以通過 $options 陣列傳遞
$user (字符串)- Github 用戶名稱。
$repo (字符串)- Github 存儲庫名稱。
$count (整數)- 默認為 5 - 要顯示的最新提交數量
自定義欄位
您還可以將每個文章或頁面的存儲庫指定為自定義欄位。您可以在添加/編輯文章屏幕的 “WP Github 提交頁面字段” 部分下添加它。
快取
此外掛將從 Github 檢索的提交進行緩存,緩存時間為 5 小時。
使用 CSS 进行样式设置
此外掛添加以下 CSS 類。如果您想自定義小工具的外觀,可以通過為這些 CSS 類添加自定義樣式來更改它。
外部 ul 標籤具有類 github-commits
每個 li 標籤具有類 github-commit
疑難排解
如果出現超時或錯誤“WP HTTP Error: name lookup timed out”,則表示您的服務器在 Github 响應之前未超時。
您可以使用此要點中的代碼來增加超時時間。
翻譯
此外掛附帶了 POT 文件。如果您願意為外掛進行翻譯,使用 POT 文件為您的語言創建 .po 文件,並讓我知道。我會在給您信用後將其添加到此外掛。
開發
此外掛的開發在 Github 上進行。如果您想為外掛做出貢獻,請在 Github 上 fork 該項目,然後向我發送拉取請求。
如果您不熟悉 git 或 Github,請參閱此指南以查看如何 fork 和發送拉取請求。
如果您正在尋找點子,可以從以下任務中開始 🙂
未來要做的事
支援簡碼
隱藏作者名稱的能力
使小工具內容的輸出可插件化
支援
如果您發現錯誤/問題或有功能請求,則請在 github issues 中發布它們
如果您有關於使用或需要協助排除故障的問題,請在 WordPress 論壇上發布,或在 外掛的主頁上留言
如果您喜歡此外掛,請在 WordPress 外掛庫頁面 上留下評論/反饋。
如果有其他事情,請在 twitter 上與我聯繫。
保持更新
我將在此 Plugin 中發布更新。
原文外掛簡介
Displays the latest commits of a github repo in the sidebar.
Features
Sidebar Widget
The Plugin provides a sidebar widget which can be configured to display commits from a github repo in the sidebar. You can have multiple widgets with different repo configured for each one of them.
Template function
In addition to using the widget, you can also use the following template function to display the commits of a github repo, anywhere in the theme
get_github_commits($user, $repo, $count);
The following options can be passed in the $options array
$user (string) – Github user name.
$repo (string) – Github repo name.
$count (int) – default 5 – Number of recent commits to show
Custom field
You can also specify the repo for each post or page as a custom field. You can add it under the “WP Github Commits Page fields” section in the Add/Edit post screen.
Caching
The Plugin caches the commits that is retrieved from Github for 5 hours.
Styling using CSS
The Plugin adds the following CSS classes. If you want to customize the look of the widget then can change it by adding custom styles to these CSS classes.
The outer ul tag has the class github-commits
Every li tag has the class github-commit
Troubleshooting
If you get timeouts or the error “WP HTTP Error: name lookup timed out” then it means that your server is not timing out before github can respond.
You can use the code from this gist to increase the timeout.
Translation
The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you.
Development
The development of the Plugin happens over at github. If you want to contribute to the Plugin, fork the project at github and send me a pull request.
If you are not familiar with either git or Github then refer to this guide to see how fork and send pull request.
If you are looking for ideas, then you can start with one of the following TODO items 🙂
TODO
Shortcode support
Ability to hide author name
Make the output of widget content plugable
Support
If you have found a bug/issue or have a feature request, then post them in github issues
If you have a question about usage or need help to troubleshoot, then post in WordPress forums or leave a comment in Plugins’s home page
If you like the Plugin, then kindly leave a review/feedback at WordPress repo page.
If anything else, then contact me in twitter.
Stay updated
I would be posting updates about this Plugin in my blog and in Twitter. If you want to be informed when new version of this Plugin is released, then you can either subscribe to this blog’s RSS feed or follow me in Twitter.
Also checkout the other WordPress Plugins that I have created.
Readme Generator
This Readme file was generated using wp-readme, which generates readme files for WordPress Plugins.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Github Commits」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | trunk |
延伸相關外掛(你可能也想知道)
Github Embed 》此外掛允許您只需貼上 URL,即可嵌入 GitHub 的詳細資訊,就像您嵌入其他嵌入來源一樣。目前支援:, , 資料庫, 使用者檔案, 專案里程碑摘要, 專案貢獻者, , ...。
Jekyll Exporter 》nclude information relevant to the issue you are reporting., , , 功能, , 將所有文章、頁面和 WordPress 設定轉換為 Markdown 和 YAML 格式,可用於 Jeky...。
Pastacode 》使用 Pastacode,您可以輕鬆地將代碼加入您的文章中,並使用宏偉的 PrismJs 着色庫。, 您可以將源代碼插入到文章編輯器中,直接將其寫入編輯器中(使用 Guten...。
Embed Block for GitHub 》這個外掛能夠在區塊編輯器中加入 GitHub 儲存庫嵌入區塊。, 此外掛是在 GitHub 上開發的,歡迎貢獻!, 特別感謝:, – @pedro-mendonca 提供 i18n/l10n ...。
WordPress GitHub Sync 》這是一個 WordPress 外掛,可以將內容與 GitHub 儲存庫(或 Jekyll 網站)進行同步, , 如果您希望能夠協同撰寫 WordPress 網站的內容(或公開展示更改歷史...。
Documents from Git 》官方文件: https://github.com/gis-ops/wordpress-markdown-git, 這個WordPress外掛讓您能夠輕鬆地從您最喜愛的遠端Git平台上發布、協作和版本控制您的[...。
Git it Write – Write posts from GitHub 》Git it Write允許將存儲在Github存儲庫中的markdown文件發布到您的WordPress網站中。因此,使用此外掛程序,當存儲庫中添加、更新文件時,WordPress文章將相...。
Gist GitHub Shortcode 》這款外掛可以通過使用 shortcode 在您的文章中添加 Github Gists。, 範例:, 添加完整的 gist:, [gist id="3837669"], , 添加 gist 中的特定文件:, [gist i...。
Embed Repo For Github 》以下為繁體中文總結:, , 透過這款 WordPress 外掛,您可以把自己的 GitHub 倉庫嵌入 WordPress 網站的各個區域,快速簡單地展示您的作品。以下為使用方法。,...。
External Markdown 》這是一個 WordPress 外掛,可使用短碼 [external_markdown] 從外部網站(例如 GitHub、GitLab 等)嵌入 Markdown 文件到 WordPress 內容中。可能的使用情況是...。
Embed GitHub Gist 》這個專案可以在 GitHub 上進行 Fork:, , https://github.com/dflydev/embed-github-gist, , 嵌入GitHub Gists, 到 WordPress 中。提供文章和頁面的縮碼,還有...。
Canvas-Nest.js 》Canvas-nest.js是 GitHub 上一個非常華麗的開源專案,它使用不到2kb的Javascript代碼,構造一個炫酷的網頁背景效果。該專案的網址是:https://github.com/aTo...。
WP Github 》WP Github 提供三個側邊欄小工具,可配置為在側邊欄中顯示來自 Github 的公開資料,包括個人資料、存儲庫、提交、問題和 Gist。您可以配置任意多個小工具以顯...。
GitHub Release Downloads 》gs » GitHub Release Downloads, you can set default values for user and repo attributes, as well as change the downloads suffix string and sel...。
Mytory Markdown 》ugin allows you to convert Markdown files to HTML and display them in your post content. You can provide a URL for the Markdown file, like a GitHub...。