वर्णन
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
- 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
स्क्रीनशॉट
स्थापना
- Log in to your WordPress admin dashboard.
- Go to Plugins > Add New.
- Search for “Syntax Highlight Nano”.
- Click Install Now, then click Activate.
नेहमी विचारले जाणारे प्रश्न
-
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/codeblocks. 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.cssor via the WordPress Customizer. The plugin uses CSS variables to make theme adjustments easier.
समीक्षा
ह्या प्लगइनसाठी कोणतेही समीक्षण नाही.
योगदानकर्ते आणि विकसक
“Syntax Highlight Nano” हे मुक्त स्रोत सॉफ्टवेअर आहे. पुढील लोक या प्लगइनच्या निर्मितीत योगदान केले आहे.
योगदानकर्तेभाषांतर करा “Syntax Highlight Nano” तुमच्या भाषेत.
विकासातील आग्रह?
कोड ब्राउझ करा, SVN संग्रहालय तपासा, किंवा विकास लॉग च्या RSS द्वारे सदस्यता घ्या.
बदलांची यादी
1.0.4
- Bug Fix.
1.0.3
- Added copy and checkmark icons to the copy button for better visual feedback.
- Improved language detection accuracy with proper language name mapping.
1.0.2
- Implemented a “Copy to clipboard” button that appears when hovering over code blocks.
- Added
has-filenameCSS class to support filename-based headers.
1.0.1
- Optimized the frontend HTML structure to use the
<pre>tag directly for styling. - Improved CSS for better integration and responsive behavior.
- Switched to client-side language auto-detection using highlight.js.
1.0.0
- Initial release of Syntax Highlight Nano.
- Added syntax highlighting, custom headers, and line numbers to WordPress code blocks.



