Chapter 1   Markdown - Fenced code blocks

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 1   Markdown - Fenced code blocks

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

## Default highlight (use settings on book.json)

```javascript
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

```javascript+theme:gitbook+lineNumbers:false
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

```javascript+theme:light+lineNumbers:false
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

```javascript+theme:dark+lineNumbers:false
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

```javascript+theme:gitbook+lineNumbers:true
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

```javascript+theme:light+lineNumbers:true
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

```javascript+theme:dark+lineNumbers:true
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

```javascript+lineNumbers:true+lineNumberStart: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
[include](markdown-fenced.md)

results matching ""

    No results matching ""