How to use code highlight

  1. Modify following at site’s config to:

    1
    2
    3
    4
    5
    highlight:
    enable: true
    line_number: true
    auto_detect: false
    tab_replace:
  2. Add code with code tag, e.g.:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    ```java
    public class Test {
    public static void main(String[] args) {
    System.out.println("Hello Code Highlight");
    }
    }
    ```
  3. Preview

    1
    2
    3
    4
    5
    6
    7
    8
    public class Test {
    public static void main(String[] args) {
    System.out.println("Hello Code Highlight");
    }
    }