{"id":262878,"date":"2025-12-13T04:35:57","date_gmt":"2025-12-13T04:35:57","guid":{"rendered":"https:\/\/ja.wordpress.org\/plugins\/syntax-highlight-nano\/"},"modified":"2026-02-27T05:06:56","modified_gmt":"2026-02-27T05:06:56","slug":"syntax-highlight-nano","status":"publish","type":"plugin","link":"https:\/\/cn.wordpress.org\/plugins\/syntax-highlight-nano\/","author":14113023,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.2","stable_tag":"1.1.2","tested":"6.9.4","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Syntax Highlight Nano","header_author":"Takashi Fujisaki","header_description":"Adds modern syntax highlighting to the core\/code block with highlight.js","assets_banners_color":"","last_updated":"2026-02-27 05:06:56","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/syntax-highlight-nano","header_author_uri":"https:\/\/yuiami.jp","rating":0,"author_block_rating":0,"active_installs":0,"downloads":279,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.4":{"tag":"1.0.4","author":"ejointjp","date":"2025-12-13 04:35:35"},"1.1.1":{"tag":"1.1.1","author":"ejointjp","date":"2026-01-26 14:24:21"},"1.1.2":{"tag":"1.1.2","author":"ejointjp","date":"2026-02-27 05:06:56"}},"upgrade_notice":{"1.0.3":"<p>Improved language detection and copy button experience.<\/p>","1.0.2":"<p>Added copy-to-clipboard functionality and filename support.<\/p>","1.0.1":"<p>Major performance improvements and better language detection.<\/p>","1.0.0":"<p>Initial release with core syntax highlighting features.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.4","1.1.1","1.1.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3418672,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3418672,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3418672,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3418672,"resolution":"4","location":"assets","locale":""}},"screenshots":{"1":"Code block in the WordPress editor with syntax highlight settings.","2":"Frontend display with syntax highlighting, header, and line numbers.","3":"Copy\u2011to\u2011clipboard button appearing on hover.","4":"Block settings panel with language selection and customization options."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,24363,148076,32776,4609],"plugin_category":[],"plugin_contributors":[131445],"plugin_business_model":[],"class_list":["post-262878","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-code-block","plugin_tags-gutenberg","plugin_tags-highlight-js","plugin_tags-syntax-highlighting","plugin_contributors-ejointjp","plugin_committers-ejointjp"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/syntax-highlight-nano.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/syntax-highlight-nano\/assets\/screenshot-1.png?rev=3418672","caption":"Code block in the WordPress editor with syntax highlight settings."},{"src":"https:\/\/ps.w.org\/syntax-highlight-nano\/assets\/screenshot-2.png?rev=3418672","caption":"Frontend display with syntax highlighting, header, and line numbers."},{"src":"https:\/\/ps.w.org\/syntax-highlight-nano\/assets\/screenshot-3.png?rev=3418672","caption":"Copy\u2011to\u2011clipboard button appearing on hover."},{"src":"https:\/\/ps.w.org\/syntax-highlight-nano\/assets\/screenshot-4.png?rev=3418672","caption":"Block settings panel with language selection and customization options."}],"raw_content":"<!--section=description-->\n<p>Syntax Highlight Nano adds beautiful, customizable syntax highlighting to WordPress's core code block.\nIt integrates seamlessly with the Gutenberg editor, providing a consistent look and feel between the editor and the frontend.\nBecause it extends the existing \"Code\" block, there is no need for a separate custom block or switching between different block types.\nThis plugin is built on top of <strong>highlight.js<\/strong>, ensuring accurate and performant syntax highlighting for a wide variety of languages.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Automatic language detection<\/strong>: Intelligently detects the programming language of your code.<\/li>\n<li><strong>Customizable header<\/strong>: Optionally display a header above the code block with a filename or language name.<\/li>\n<li><strong>Line numbers<\/strong>: Toggle line numbers on or off to improve code readability.<\/li>\n<li><strong>Copy to clipboard button<\/strong>: A convenient button appears on hover, allowing users to copy the code with a single click.<\/li>\n<li><strong>Lightweight and performant<\/strong>: Uses highlight.js for efficient, optimized syntax highlighting.<\/li>\n<li><strong>WordPress best practices<\/strong>: Built following WordPress development standards.<\/li>\n<\/ul>\n\n<h4>How to Use<\/h4>\n\n<ol>\n<li>Install and activate the plugin.<\/li>\n<li>In the WordPress editor, add a standard \"Code\" block.<\/li>\n<li>Enter your code.<\/li>\n<li>In the block settings sidebar, you can:\n\n<ul>\n<li>Select a programming language (or leave it for automatic detection).<\/li>\n<li>Add a filename.<\/li>\n<li>Toggle header visibility.<\/li>\n<li>Toggle line number visibility.<\/li>\n<\/ul><\/li>\n<li>The code block will be automatically highlighted on the frontend.<\/li>\n<\/ol>\n\n<h3>Privacy<\/h3>\n\n<p>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.<\/p>\n\n<h3>Credits<\/h3>\n\n<p>This plugin uses highlight.js (BSD 3\u2011Clause License).\nCopyright (c) 2006, Ivan Sagalaev\nhttps:\/\/github.com\/highlightjs\/highlight.js<\/p>\n\n<h3>Support<\/h3>\n\n<p>For support, feature requests, and bug reports, please visit:\nhttps:\/\/github.com\/takashifujisaki\/syntax-highlight-nano\/issues<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Log in to your WordPress admin dashboard.<\/li>\n<li>Go to <strong>Plugins &gt; Add New<\/strong>.<\/li>\n<li>Search for \"Syntax Highlight Nano\".<\/li>\n<li>Click <strong>Install Now<\/strong>, then click <strong>Activate<\/strong>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"what%20programming%20languages%20are%20supported%3F\"><h3>What programming languages are supported?<\/h3><\/dt>\n<dd><p>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, PowerShell, and AppleScript.<\/p><\/dd>\n<dt id=\"will%20this%20affect%20my%20existing%20code%20blocks%3F\"><h3>Will this affect my existing code blocks?<\/h3><\/dt>\n<dd><p>Yes. This plugin enhances all standard WordPress <code>core\/code<\/code> blocks. Existing code blocks are automatically highlighted based on your settings.<\/p><\/dd>\n<dt id=\"is%20it%20compatible%20with%20my%20theme%3F\"><h3>Is it compatible with my theme?<\/h3><\/dt>\n<dd><p>The plugin uses its own scoped CSS to minimize conflicts with themes. It is designed to be as non\u2011intrusive as possible. If you encounter any styling issues, please report them.<\/p><\/dd>\n<dt id=\"does%20it%20impact%20website%20performance%3F\"><h3>Does it impact website performance?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20customize%20the%20styling%3F\"><h3>Can I customize the styling?<\/h3><\/dt>\n<dd><p>Yes. You can override the default styles by adding custom CSS to your theme's <code>style.css<\/code> or via the WordPress Customizer. The plugin uses CSS variables to make theme adjustments easier.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Bug fix: Resolved 500 fatal error on code block save caused by undefined settings array keys in PHP 8.1+.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Bug Fix.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added support for AppleScript.<\/li>\n<li>Update CSS.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Bug Fix.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Added copy and checkmark icons to the copy button for better visual feedback.<\/li>\n<li>Improved language detection accuracy with proper language name mapping.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Implemented a \"Copy to clipboard\" button that appears when hovering over code blocks.<\/li>\n<li>Added <code>has-filename<\/code> CSS class to support filename-based headers.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Optimized the frontend HTML structure to use the <code>&lt;pre&gt;<\/code> tag directly for styling.<\/li>\n<li>Improved CSS for better integration and responsive behavior.<\/li>\n<li>Switched to client-side language auto-detection using highlight.js.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release of Syntax Highlight Nano.<\/li>\n<li>Added syntax highlighting, custom headers, and line numbers to WordPress code blocks.<\/li>\n<\/ul>","raw_excerpt":"Adds modern syntax highlighting to WordPress&#039;s standard code block using the robust highlight.js library.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/262878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=262878"}],"author":[{"embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/ejointjp"}],"wp:attachment":[{"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=262878"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=262878"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=262878"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=262878"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=262878"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=262878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}