[WordPress] 外掛分享: Syntax Highlight Nano

首頁外掛目錄 › Syntax Highlight Nano
全新外掛
安裝啟用
尚無評分
44 天前
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v1.1.2 上架:2025-12-12

內容簡介

總結:Syntax Highlight Nano 為 WordPress 的核心代碼塊添加了美觀,可定制的語法突出顯示功能,並與 Gutenberg 編輯器無縫集成,提供編輯器和前端間一致的外觀和感覺。

問題與答案:
1. 這個外掛主要功能是什麼?
- 回答:為WordPress的核心代碼塊添加美觀、可定制的語法突出顯示功能。

2. 這個外掛如何與Gutenberg編輯器集成?
- 回答:它與Gutenberg編輯器無縫集成,提供編輯器和前端間的一致外觀和感覺。

3. 安裝並激活這個外掛後,如何使用?
- 回答:在WordPress編輯器中添加標準的"Code"塊,輸入代碼。在塊設置側邊欄中可以選擇編程語言、添加文件名、切換標題可視性以及切換行號可視性。

4. 這個外掛的隱私政策如何?
- 回答:這個外掛不收集任何個人數據,不設置cookies,也不與外部服務連接。所有處理都在您的伺服器上和使用者的瀏覽器中進行。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Syntax Highlight Nano adds beautiful, customizable syntax highlighting to WordPress’s core code block.
It integrates seamlessly with the Gutenberg editor, providing a consistent look and feel between the editor and the frontend.
Because it extends the existing “Code” block, there is no need for a separate custom block or switching between different block types.
This plugin is built on top of highlight.js, ensuring accurate and performant syntax highlighting for a wide variety of languages.
Features

Automatic language detection: Intelligently detects the programming language of your code.
Customizable header: Optionally display a header above the code block with a filename or language name.
Line numbers: Toggle line numbers on or off to improve code readability.
Copy to clipboard button: A convenient button appears on hover, allowing users to copy the code with a single click.
Lightweight and performant: Uses highlight.js for efficient, optimized syntax highlighting.
WordPress best practices: Built following WordPress development standards.

How to Use

Install and activate the plugin.
In the WordPress editor, add a standard “Code” block.
Enter your code.
In the block settings sidebar, you can:

Select a programming language (or leave it for automatic detection).
Add a filename.
Toggle header visibility.
Toggle line number visibility.

The code block will be automatically highlighted on the frontend.

Privacy
This plugin does not collect any personal data. It does not set cookies or connect to external services. All processing happens locally on your server and in the user’s browser.
Credits
This plugin uses highlight.js (BSD 3‑Clause License).
Copyright (c) 2006, Ivan Sagalaev
https://github.com/highlightjs/highlight.js
Support
For support, feature requests, and bug reports, please visit:
https://github.com/takashifujisaki/syntax-highlight-nano/issues

延伸相關外掛

文章
Filter
Mastodon