Linux 软件免费装

Syntax Highlight Nano

开发者 ejointjp
更新时间 2025年12月13日 12:35
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

gutenberg code syntax highlighting code block highlight.js

下载

1.0.4

详情介绍:

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. Features How to Use
  1. Install and activate the plugin.
  2. In the WordPress editor, add a standard "Code" block.
  3. Enter your code.
  4. In the block settings sidebar, you can:
  5. Select a programming language (or leave it for automatic detection).
  6. Add a filename.
  7. Toggle header visibility.
  8. Toggle line number visibility.
  9. The code block will be automatically highlighted on the frontend.

安装:

  1. Log in to your WordPress admin dashboard.
  2. Go to Plugins > Add New.
  3. Search for "Syntax Highlight Nano".
  4. Click Install Now, then click Activate.

屏幕截图:

  • Frontend display with syntax highlighting, header, and line numbers.
  • Copy‑to‑clipboard button appearing on hover.
  • Block settings panel with language selection and customization options.

升级注意事项:

1.0.3 Improved language detection and copy button experience. 1.0.2 Added copy-to-clipboard functionality and filename support. 1.0.1 Major performance improvements and better language detection. 1.0.0 Initial release with core syntax highlighting features.

常见问题:

What programming languages are supported?

Syntax Highlight Nano supports a wide range of languages including JavaScript, TypeScript, PHP, Python, Ruby, Java, C#, C++, C, Go, Rust, Swift, Kotlin, HTML, CSS, SCSS, Less, JSON, XML, YAML, Markdown, SQL, Bash, Shell, and PowerShell.

Will this affect my existing code blocks?

Yes. This plugin enhances all standard WordPress core/code blocks. Existing code blocks are automatically highlighted based on your settings.

Is it compatible with my theme?

The plugin uses its own scoped CSS to minimize conflicts with themes. It is designed to be as non‑intrusive as possible. If you encounter any styling issues, please report them.

Does it impact website performance?

The plugin is optimized for performance. Highlight.js is only loaded on pages that contain code blocks, and editor assets are only loaded in the WordPress admin.

Can I customize the styling?

Yes. You can override the default styles by adding custom CSS to your theme's style.css or via the WordPress Customizer. The plugin uses CSS variables to make theme adjustments easier.

更新日志:

1.0.4 1.0.3 1.0.2 1.0.1 1.0.0