[WordPress] 外掛分享: GitHub Release Downloads

首頁外掛目錄 › GitHub Release Downloads
WordPress 外掛 GitHub Release Downloads 的封面圖片
70+
安裝啟用
★★★★
4.8/5 分(4 則評價)
1940 天前
最後更新
問題解決
WordPress 3.1+ v2.3.1 上架:2015-03-18

內容簡介

GitHub Release Downloads 可在 WordPress 網站中透過短代碼顯示 GitHub 儲存庫的下載次數、下載連結及版本資訊,方便開發者直接在網站上呈現專案的發布與下載統計數據。

【主要功能】
• 以短代碼顯示 GitHub 儲存庫的總下載次數
• 產生含版本說明與下載連結的發布清單
• 可篩選最新版本或指定標籤的發布資料
• 支援隱藏檔案大小、下載數、原始碼等欄位
• 可在設定頁面預設使用者名稱與儲存庫名稱
• 自動解析標籤名稱並輸出版本號

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.3.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「GitHub Release Downloads」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

GitHub Release Downloads allows you to get the download count, links and more information for releases of GitHub repositories.
Download count
The shortcode is [grd_count]. It returns a number corresponding to the sum of all download count values for the selected releases. For instance, you can get the number of total downloads for one GitHub repository.
Attributes

user: the GitHub username.
repo: the GitHub repository name.
latest: only gets information about the latest published release for the repository.
tag: only gets information about the release with the specified tag name.
prereleases: includes draft releases and prereleases. Default value is false.

Examples

All repository downloads: [grd_count user="IvanRF" repo="MassiveFileRenamer"]
Latest release downloads: [grd_count user="IvanRF" repo="MassiveFileRenamer" latest="true"]
Specific release downloads: [grd_count user="IvanRF" repo="MassiveFileRenamer" tag="v1.6.0"]

Note: user and/or repo can be omitted if default values are set.
Release downloads list
The shortcode is [grd_list]. It returns an HTML list for the selected releases including the release tag name, the release description and the list of files that can be downloaded, like release assets or the source code.
For styling, class selectors are provided (e.g.: release-downloads-header, release-name, etc.).
Attributes

user, repo, latest, tag, prereleases: same as above.
hide_description: hides the release description.
hide_size: hides information about the file size.
hide_downloads: hides information about the download count.
downloads_suffix: use it for internationalization. Default value is " downloads".
hide_source_code: hides the download link for the source code.

Examples

All repository downloads: [grd_list user="IvanRF" repo="MassiveFileRenamer"]
Latest release downloads: [grd_list user="IvanRF" repo="MassiveFileRenamer" latest="true"]
Specific release downloads: [grd_list user="IvanRF" repo="MassiveFileRenamer" tag="v1.5.6"]
Hide file size: [grd_list user="IvanRF" repo="MassiveFileRenamer" hide_size="true"]
Hide downloads count: [grd_list user="IvanRF" repo="MassiveFileRenamer" hide_downloads="true"]
Downloads suffix change: [grd_list user="IvanRF" repo="MassiveFileRenamer" downloads_suffix="descargas"]

Boolean attributes can take any of this values: “1”, “true”, “on” and “yes”; or “0”, “false”, “off” and “no”.
Latest version
The shortcode is [grd_latest_version]. It returns the tag name of the latest published full release.
For tag names like “v1.6.0”, it returns “1.6.0” as the version number.
Attributes

user, repo, prereleases: same as above.

Settings
Under WordPress Settings menu you will find the GitHub Release Downloads options page. In this page you can set values for the GitHub username and the repository name to use by default in the shortcodes.
If both values are set, the shortcodes can be used without attributes (e.g.: [grd_count]) since default values for user and repo will be used.
Attribute values take precedence over default values. For example, [grd_count repo="MyRepo"] will use the username default value and the repository specified in the shortcode.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon