[WordPress] 外掛分享: Xhtheme Code Block

首頁外掛目錄 › Xhtheme Code Block
10+
安裝啟用
尚無評分
197 天前
最後更新
問題解決
WordPress 5.0+ PHP 7.2+ v1.0.2 上架:2025-02-05

內容簡介

**總結:**
Xhtheme Code Block 是一個 WordPress 外掛,用於在您的網站上添加程式碼區塊,支援語法高亮,並能適應主題的明亮和暗黑模式切換。

**問題與答案:**
1. Xhtheme Code Block 外掛主要功能是什麼?
- 答: Xhtheme Code Block 外掛建立程式碼區塊到您的 WordPress 網站,支援多種程式語言的語法高亮。

2. 這個外掛如何適應主題的明亮和暗黑模式切換?
- 答: 它能讓使用者選擇明亮、暗黑或自動模式。

3. 這個外掛支援何種客製化顯示?
- 答: Xhtheme Code Block 外掛支援自訂檔案名稱的顯示。

4. 這個外掛使用了哪些外部程式庫?
- 答: 外部程式庫包括 Alpine.js 與 Prism.js。Alpine.js 是一個輕量的 JavaScript 框架,用於在 HTML 中添加互動性,並管理設定頁面的反應狀態。Prism.js 是一個輕量、可擴展的語法高亮插件,用以提供廣泛的程式語言語法高亮功能。

5. 如何找到 Xhtheme Code Block 外掛的原始碼?
- 答: 您可以在 block-code/src 目錄中找到 build/index.js 的原始碼。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Xhtheme Code Block is a plugin for adding code blocks to your WordPress site, supporting syntax highlighting and adapting to the theme’s light and dark mode switching.

Supports syntax highlighting for multiple programming languages.
Allows selection of light, dark, or auto mode.
Supports custom filename display.

External Libraries

Alpine.js:

Version: 3.x.x
Source: Alpine.js Official Website
Description: Alpine.js is a lightweight JavaScript framework for adding interactivity to HTML. It is used in the Xhtheme Code Block plugin to manage the reactive state of the settings page, allowing for dynamic updates and user interactions without the need for page reloads.

Prism.js:

Version: 1.x.x
Source: Prism.js Official Website
Description: Prism.js is a lightweight, extensible syntax highlighter, built with modern web standards in mind. It is used in the Xhtheme Code Block plugin to provide syntax highlighting for a wide range of programming languages.

Source Code
The source code for build/index.js can be found in the block-code/src directory.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon