[WordPress] 外掛分享: Embed GitHub Gist

首頁外掛目錄 › Embed GitHub Gist
100+
安裝啟用
★★★★★
5/5 分(4 則評價)
4843 天前
最後更新
問題解決
WordPress 2.8.6+ v0.13 上架:2010-08-23

內容簡介

這個專案可以在 GitHub 上進行 Fork:

https://github.com/dflydev/embed-github-gist

嵌入GitHub Gists
到 WordPress 中。提供文章和頁面的縮碼,還有手動嵌入的能力,以防需要在頁面中嵌入 Gist,但不通過縮碼篩濾器的情況。

範例:

[gist id=546764]
[gist id=546764 file=file.txt]
[gist id=546764 file=file.txt bump=1]
[gist]http://gist.github.com/546764[/gist]

已經使用 Transients API 實現了快取,以最小化載入內容的延遲。預設的 TTL(生存時間)為86400秒或一天。

即將推出的功能:

設置默認 TTL 的選項
跳過快取的選項
實現管理介面以控制選項

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.13) 或搜尋安裝

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

原文外掛簡介

This project is available for forking on GitHub:

https://github.com/dflydev/embed-github-gist

Embed GitHub Gists into
WordPress. Provides a shortcode for posts and pages but also has the ability
to embed by hand in the event that a Gist needs to be embedded somewhere in
the page that does not pass through the shortcode filters.
Examples:
[gist id=546764]
[gist id=546764 file=file.txt]
[gist id=546764 file=file.txt bump=1]
[gist]http://gist.github.com/546764[/gist]

Cache is implemented with the Transients API to minimize delay on loading
content. Default TTL (time to live) is 86400 seconds or one day.
Upcoming features:

Option for setting default TTL
Option to bypass cache entirely
Implement admin interface to control options

延伸相關外掛

文章
Filter
Apply Filters
Mastodon