[WordPress] 外掛分享: GitHub Gist Shortcode Plugin

首頁外掛目錄 › GitHub Gist Shortcode Plugin
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
10+
安裝啟用
尚無評分
6030 天前
最後更新
問題解決
WordPress 2.5.1+ v0.2 上架:2008-12-01

內容簡介

這款外掛允許您不必複製貼上 HTML,就能用 [gist] 短碼方式完成內嵌GitHub Gist(一種類似於加強版的 pastie)的操作。

例如,要在文章或頁面中內嵌gist: 30948,只需輸入以下內容:

[gist id=30948]

就這麼簡單。

gists 的一個問題是,在部落格中搜尋引擎蜘蛛和禁用 javascript 的使用者將無法看到您的程式碼。此外掛可讓您通過在短碼中包含文字來解決此問題,如 gist 的內容。該文本會以以下標記包裹:

<noscript><code class="gist"><pre>

您可按以下方式使用此功能:

[gist id=30948]
puts hello_world_test;
i = 0
5.times do
i = i + 1
puts i
end
[/gist]

gist 短碼內的內容是可選的。

查看變更日誌以查看版本之間的更改。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「GitHub Gist Shortcode Plugin」→ 直接安裝(推薦)

原文外掛簡介

Instead of embedding a GitHub Gist (a pastie like service on steroids) by copying and pasting HTML you can simple embed it with a [gist] shortcode.
For example, to embed the gist: 30948 enter this in a post or page:
[gist id=30948]

It is that simple.
One problem with gists is that a search engine spiders (and users with javascript disabled) will not see your code in a blog entry. This plugin allows you to get around this by including text, such as content of the gist inside the shortcode. The text is wrapped inside these tags:

You would use it like this:
[gist id=30948]
puts hello_world_test;
i = 0
5.times do
i = i + 1
puts i
end
[/gist]

The content inside a gist shortcode is optional.
View the CHANGELOG to see what has changed between versions.

延伸相關外掛

文章
Filter
Mastodon