Chapter 4   Markdown - include-codeblock

This is a part of the “Gitbook Sunlight Highlighter Test”.

Default highlight (use settings on book.json)

1 2 3 4 5 6 7 8 9 10
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!')
})

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

1 2 3 4 5 6 7 8 9 10
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, has line numbers

1 2 3 4 5 6 7 8 9 10
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, has line numbers

1 2 3 4 5 6 7 8 9 10
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!')
})

Default theme, line numbers starts from 100

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!')
})

Source code for this file

# Chapter 4   Markdown - 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](markdown-include-codeblock.md)

results matching ""

    No results matching ""