
內容簡介
這是一個簡單的外掛,它可以讓 WordPress 支援 Gist 代碼的嵌入,並提供了一個短代碼。
短代碼有兩個屬性,一個是 Gist 來源 URL,另一個是(可選的)嵌入式代碼窗口的高度。
[gist src="" height=""]
Gist src 屬性必須是嵌入 URL,例如:https://gist.github.com/imaginarymedia/316a29936e5e7d709665.js
Gist height 屬性是可選的,可以是具有有效 CSS 單位測量的任何值,例如 em、%、px、vh 等。它會對代碼加上最大高度。
該外掛還為視覺和文本編輯器創建了 UI 按鈕。
如果您有改進建議,請通過 外掛支援頁面 聯繫我們;如果您覺得這個外掛有用,請為外掛寫下評論。
由 James Robinson 開發。
** 待辦事項 **
* 驗證 gist src URL
外掛標籤
開發者團隊
原文外掛簡介
A simple plugin that enables a shortcode for embedding Gist code in WordPress.
The shortcode has two attributes, the Gist source URL and, optionally, the height of the embedded code window.
[gist src="" height=""]
The Gist src attribute must be the embed URL, for example: https://gist.github.com/imaginarymedia/316a29936e5e7d709665.js
The Gist height attribute is optional and can be any value with a valid CSS unit measure: em, %, px, vh, etc. It will apply a max-height to the gist.
The plugin also creates UI buttons for both the visual and text editors.
If you have suggestions for improvements, please contact us. via the plugin support page and if you find this useful, please review the plugin.
Developed by James Robinson.
** TO DO **
* Validate the gist src URL
