Vaaky Highlighter

外掛說明

Vaaky Highlighter is a free, easy-to-use, syntax highlighting tool for WordPress. Highlighting is powered by the Highlight.js javaScript syntax highlighter with language auto-detection and zero dependencies.

Using it will be as straightforward as adding a replacement Vaaky Highlighter Sourcecode block (Gutenberg) and insert the code that you wish to highlight: Vaaky Highlighter takes care of the rest!

Here is the demo page of all the supported themes.

Usage

  1. Add a Vaaky Highlighter block within your content
  2. Write your code
  3. Select the language (optional)
  4. Save the post/page and check your in frontend

Supported languages

  • Apache
  • Bash
  • C
  • C#
  • C++
  • CSS
  • DNS Zone file
  • DOS
  • Django
  • Dockerfile
  • Go
  • HTML
  • XML
  • Handlebars
  • JSON
  • Java
  • JavaScript
  • Markdown
  • Nginx
  • Objective C
  • PHP
  • Plaintext
  • PostgreSQL & PL/pgSQL
  • PowerShell
  • Python
  • R
  • Ruby
  • Rust
  • SCSS
  • SQL/MySQL
  • Shell
  • Twig
  • TypeScript
  • YAML/YML

螢幕擷圖

  • Plugin Settings Page
  • Visual Studio 2015 Theme: JavaScript Snippet
  • Visual Studio 2015 Theme: PHP Snippet
  • Visual Studio 2015 Theme: YAML Snippet
  • Sublime (Monokai) Theme: JavaScript Snippet
  • Sublime (Monokai) Theme: YAML Snippet
  • Sublime (Monokai) Theme: PHP Snippet with Scrollbar
  • Sublime (Monokai) Theme: PHP Snippet with Line Wrap

安裝方式

Minimum Requirements

  • PHP 5.6 or greater is recommended
  • WordPress 5.0 or greater is recommended

Automatic installation

Automatic installation is that the best choice — WordPress can handle the file transfer, and you won’t have to be compelled to leave your browser.

  1. Go to “Plugins” in your WordPress dashboard
  2. Click on “Add New”
  3. Type “Vaaky Highlighter” in the search field
  4. Click “Search Plugins.”
  5. Once you’ve found us, you can view details about it such as the point release, rating, and description. Most importantly, of course, you can install it by clicking “Install” and WordPress will take it from there.
  6. Click on Activate

Manual installation

  1. Download the plugin archive
  2. Go to “Plugins” in your WordPress dashboard
  3. Click on “Add New”
  4. Upload Vaaky Highlighter archive
  5. Activate the plugin

Having issue? Check the WordPress codex contains instructions on how to do this here.

常見問題集

What library does this plugin use?

It uses Highlight.js

What is the theme it supports

Currently, it supports 25 themes out of which 16 are the dark theme which includes Monokai (Sublime), Visual Studio, GitHub Dark, Android Studio, etc. and 9 are the light themes which include Github, StackOverflow, Google Code, etc.

How an add a language that is not supported by you but supported by highlightjs

In that case, do not select any language from dropdown, highlightjs will auto-detect the language. If it still didn’t work you can request for a feature request

Does it has line number

No

Does it support Classic Editor? If yes then how to add the code snippet?

Yes, it will work in WordPress Classic Editor. You have to add it in the form of shortcode, like this [vaakyHighlighterCode lang="php"] Write your code here.[/vaakyHighlighterCode].
If you know the abbreviation of the language then you can provide in lang attribute like php or js or cpp else ignore the attribute all together plugin will auto-detect the language and will highlight based on that.

使用者評論

2023 年 5 月 14 日
Vaaky Highlighter is a great plugin for adding syntax highlighting to code snippets on WordPress sites. It's easy to use and supports a wide range of languages making it a reliable choice. Overall, I highly recommend it with a 5 star rating.
閱讀全部 2 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Vaaky Highlighter〉的開發相關工作。

參與者

將〈Vaaky Highlighter〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.6 2024-01-01

  • Fix – declare $settingOptionGroup in Settings.php to silence deprecated message 6457d69
  • Tested and updated WordPress compatibility with new version

1.0.5 2023-09-09

  • Fix – Notice: Trying to access array offset on value of type bool
  • Tested and updated WordPress compatibility with new version

1.0.4 2023-05-05

  • Tested and updated WordPress compatibility with new version

See the changelog for all versions.