File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff 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+ ```
You can’t perform that action at this time.
0 commit comments