Chapter 5 AsciiDoc - include-codeblock
This is a part of the “Gitbook Sunlight Highlighter Test”.
Default highlight (use settings on book.json)
Highlight with options
gitbook theme, no line numbers
const express = require('express')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
light theme, no line numbers
const express = require('express')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
dark theme, no line numbers
const express = require('express')
const app = express()
app.get('/', function (req, res) {
res.send('Hello World!')
})
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
gitbook theme, has line numbers
light theme, has line numbers
dark theme, has line numbers
Source code for this file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Chapter 5 AsciiDoc - include-codeblock
This is a part of the “Gitbook Sunlight Highlighter Test”.
## Default highlight (use settings on book.json)
[include](snippet.js)
---
## Highlight with options
### gitbook theme, no line numbers
[include, lang:"javascript+theme:gitbook+lineNumbers:false"](snippet.js)
### light theme, no line numbers
[include, lang:"javascript+theme:light+lineNumbers:false"](snippet.js)
### dark theme, no line numbers
[include, lang:"javascript+theme:dark+lineNumbers:false"](snippet.js)
### gitbook theme, has line numbers
[include, lang:"javascript+theme:gitbook+lineNumbers:true"](snippet.js)
### light theme, has line numbers
[include, lang:"javascript+theme:light+lineNumbers:true"](snippet.js)
### dark theme, has line numbers
[include, lang:"javascript+theme:dark+lineNumbers:true"](snippet.js)
### Default theme, line numbers starts from 100
[include, lang:"javascript+lineNumbers:true+lineNumberStart:100"](snippet.js)
---
## Source code for this file
[include](asciidoc-include-codeblock.adoc)