@@ -8,12 +8,88 @@ Below is an example with line numbers, a custom header, and line highlighting.
88
99![ exampleImage] ( https://raw.githubusercontent.com/mProjectsCode/obsidian-shiki-plugin/master/exampleImage.png )
1010
11+ ## Comparison
12+
13+ Default Obsidian syntax highlighting:
14+
15+ ![ exampleImageObsidian] ( https://raw.githubusercontent.com/mProjectsCode/obsidian-shiki-plugin/master/exampleImageObsidian.png )
16+
17+ Shiki Plugin syntax highlighting:
18+
19+ ![ exampleImagePlain] ( https://raw.githubusercontent.com/mProjectsCode/obsidian-shiki-plugin/master/exampleImagePlain.png )
20+
21+ ## Usage
22+
23+ The plugin will automatically highlight code blocks in your notes.
24+
25+ To configure the code block you add the configuration options on the same line as the opening triple backticks.
26+
27+ ```` md
28+ ```language configurationHere
29+ ...
30+ ```
31+ ````
32+
33+ More info on the configuration options can be found on the [ Expressive Code homepage] ( https://expressive-code.com/ ) .
34+
35+ ### Line Numbers
36+
37+ Line numbers can be enabled with ` showLineNumbers ` .
38+
39+ ```` md
40+ ```language showLineNumbers
41+ ...
42+ ```
43+ ````
44+
45+ ### Title
46+
47+ A title can be added with ` title="Title Here" ` .
48+
49+ ```` md
50+ ```language title="Title Here"
51+ ...
52+ ```
53+ ````
54+
55+ ### Line Highlighting
56+
57+ Line highlighting can be enabled with ` {1, 5-10} ` .
58+ Lines can either be single lines or ranges.
59+
60+ ```` md
61+ ```language {1, 5-10}
62+ ...
63+ ```
64+ ````
65+
66+ #### Diff Highlighting
67+
68+ Diff highlighting can be enabled with ` ins={1} ` and ` del={5-10} ` .
69+ Lines specified in ` ins ` will be highlighted green, and lines specified in ` del ` will be highlighted red.
70+ Lines can once again either be single lines or ranges.
71+
72+ ```` md
73+ ```language ins={1} del={5-10}
74+ ...
75+ ```
76+ ````
77+
78+ When the language is set to ` diff ` , the plugin will automatically enable diff highlighting for lines either prefixed by ` + ` or ` - ` .
79+
1180## License
1281
1382[ MIT] ( https://github.com/mProjectsCode/obsidian-shiki-plugin/blob/master/LICENSE )
1483
1584## Installation
1685
86+ ### Obsidian Marketplace (Recommended)
87+
88+ 1 . Open ` Settings -> Community Plugins ` in your vault
89+ 2 . Click on the ` Browse ` button in the ` Community plugins ` section
90+ 3 . Search for ` Shiki Highlighter `
91+ 4 . Select ` Shiki Highlighter ` and click first ` Install ` , then ` Enable `
92+
1793### BRAT
1894
19951 . Install and enable the ` BRAT ` plugin
0 commit comments