[WordPress] 外掛分享: Markdeep Block

首頁外掛目錄 › Markdeep Block
全新外掛
安裝啟用
尚無評分
1176 天前
最後更新
問題解決
WordPress 5.9+ PHP 7.0+ v0.0.2 上架:2022-07-27

內容簡介

「Markdeep 適用於設計文件、規格、README 文件、代碼文件、實驗報告、部落格和技術網頁。因為源碼是純文字,所以 Markdeep 與軟體開發工具鏈相容良好。」
——http://casual-effects.com/markdeep/

「Markdeep 是一種 Markdown 的文字格式語法,以及一個在瀏覽器中運行的 JavaScript 程序。它最強大的兩大特點為能夠在任何支援 JavaScript 的瀏覽器中運行,以及包含了圖表的功能。」
——https://casual-effects.com/markdeep/features.md.html

此外掛會新增一個支援 Markdeep 語言的 Gutenberg 區塊。編輯器會顯示一個純文本區塊用於撰寫文章,以及一個預覽區塊用於顯示已渲染的區塊。

MathJax & CDN

為了支援 MathJax 功能,此控制器會從外部 CDN (cdnjs/cloudflare) 載入 MathJax 函式庫。

MathJax.org 不會收集、維護、發佈、購買或出售任何個人資料,並且不使用任何 cookie 或其他追蹤或廣告技術。

同樣地,MathJax 軟體不會追蹤使用者,並且只使用本地儲存來維護 MathJax 上下文選單設置的偏好。

——https://www.mathjax.org/#privacy-statement

如果您未更改 CDN,您將受到 cloudflare 的條款&隱私政策約束。

可通過一行腳本更改此 CDN。(另外,也可以使用 WordPress 插件文件編輯器取消註解 markdeep-block.php 中類似的一行腳本)。將來這應該會成為一個屬性配置選項。

要覆寫 CDN,請使用:

`php

// Markdeep 目前使用版本 2.7.6
add_filter( 'markdeepblock_mathjax_url', fn($u) => 'https://cdn.jsdelivr.net/npm/[email protected]/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
`

預計的功能

用戶介面以配置 JS 資源的 CDN(Markdeep、MathJax)。
按區塊可配置樣式。
全局和按區塊的下拉式樣式選擇。
在編輯器中啟用 MathJax 命令。(MathJax 目前支援文章)
針對 Markdeep 的 LaTeX/MathJax 宏。(例如: θ₀, θ₁ 等)
可配置的 MathJax 宏。
選擇性目錄(目前已取消)

標誌

此標誌基於 Dustin Curtis 的 https://github.com/dcurtis/markdown-mark 衍生而來。

外掛標籤

開發者團隊

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

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

原文外掛簡介

“Markdeep is ideal for design documents, specifications, README files, code documentation, lab reports, blogs, and technical web pages. Because the source is plain text, Markdeep works well with software development toolchains.”
— http://casual-effects.com/markdeep/
“Markdeep is a text formatting syntax that extends Markdown, and a JavaScript program for making it work in browsers. The two most powerful features are its ability to run in any web browser on the client side and the inclusion of diagrams.”
— https://casual-effects.com/markdeep/features.md.html

This plugin adds a gutenberg block supporting the markdeep language. The editor shows both a plaintext
area for composing the text, and a preview area to display the rendered block.
MathJax & CDN
In order to support MathJax features, the MathJax library is loaded from an external CDN (cdnjs/cloudflare).

MathJax.org does not collect, maintain, distribute, purchase, or sell personal data of any kind, and uses no cookies or other tracking
or advertising techniques.
Likewise, the MathJax software does not track you, and uses local storage only to maintain your preferences as set by the MathJax contextual menu.
— https://www.mathjax.org/#privacy-statement

If you do not change the CDN you will be subject to cloudflare’s terms & privacy policy.
This CDN can be changed with a one-line script. (Alternately, use the WordPress plugin file editor to uncomment a similar line in
markdeep-block.php). In the future this should be an exposed configuration option.
To override the CDN use:
`php

// Markdeep currently uses version 2.7.6
add_filter( ‘markdeepblock_mathjax_url’, fn($u) => ‘https://cdn.jsdelivr.net/npm/[email protected]/unpacked/MathJax.js?config=TeX-AMS-MML_HTMLorMML’ );
`
Planned features

UI to configure CDN for JS resources (Markdeep, MathJax).
Configurable style per block.
Drop-down style selection of styles (globally & per-block).
Get MathJax commands working in editor. (MathJax currently works in posts).
Markdeep specific LaTeX/MathJax macros. (e.g. θ₀, θ₁, etc.)
Configurable MathJax macros.
Optional Table of Contents (currently suppressed)

Logo
The logo is derived from Dustin Curtis’s https://github.com/dcurtis/markdown-mark.

文章
Filter
Apply Filters
Mastodon