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

首頁外掛目錄 › GitHub Gist WordPress Plugin
10+
安裝啟用
尚無評分
5657 天前
最後更新
問題解決
WordPress 2.5.1+ v1.1 上架:2010-07-29

內容簡介

GitHub Gist WordPress 外掛允許您使用[gist]標籤嵌入GitHub Gist程式碼片段,而不是複製並貼上HTML。例如,若要嵌入來自gist: 447298的github_gist_wordpress_plugin_test.txt檔案,請在[gist]標籤中填入id和file屬性:[gist id=447298 file=github_gist_wordpress_plugin_test.txt]或者從GitHub複製嵌入JavaScript代碼,直接將其粘貼到[gist]標籤的正文中:[gist]<script src="http://gist.github.com/447298.js?file=github_gist_wordpress_plugin_test.txt"></script>[/gist]。[gist]標籤還會展開嵌入的Gist內容,並以 “<noscript><code><pre>”包裝它,這樣搜尋引擎蜘蛛、禁用JavaScript的用戶和通過RSS閱讀您的博客的用戶仍然可以在博客文章中看到您的程式碼。

外掛標籤

開發者團隊

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

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

原文外掛簡介

GitHub Gist WordPress Plugin allows you to embed GitHub Gist snippets with a [gist] tag, instead of copying and pasting HTML. For example, to embed the github_gist_wordpress_plugin_test.txt file from gist: 447298, fill in the id and file attributes in the [gist] tag:
[gist id=447298 file=github_gist_wordpress_plugin_test.txt]
or
copy the embedding JavaScript code from GitHub and directly paste it in the body of the [gist] tag:
[gist][/gist].
The [gist] tag also expands the content of the embedded Gist and wraps it with “

” so that search engine spiders, users with javascript disabled and users reading your blog through RSS will still see your code in a blog entry.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon