Skip to content

Commit e82cdbe

Browse files
committed
1 parent 3ff7e54 commit e82cdbe

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ If URL links to raw file, it will work.
3535

3636
## Options
3737

38-
Set like as `{cap:false,re:true}`. Please do __NOT__ insert any spaces.
38+
Set like as `{cap:false,re:true,lang:javascript}`. Please do __NOT__ insert any spaces.
3939

4040
| option | description | default |
4141
| :--- | :--- | :--- |
4242
| cap| `true`: show caption<br> `false`: no caption | `true` |
4343
| re| `true`: the first line number restart from 1<br> `false`: the first line number start from original code number | `false` |
44+
| lang| the language to use for highlighting | the extension of the file |
4445

4546
### Config setting
4647

@@ -81,3 +82,9 @@ Insert code from line 17 to line 22.
8182
```
8283

8384
![Restart the first line number from 1](https://i.gyazo.com/dc3611fc637352bbe5c57bf7d94f60f2.png)
85+
86+
87+
### Force the language highlighting to HTML for a JavaScript file
88+
```
89+
{% ghcode https://github.com/nkmk/hexo-list-related-posts/blob/master/lib/index.js 17 22 {lang:html} %}
90+
```

0 commit comments

Comments
 (0)