Chapter 3   AsciiDoc - AsciiDoc syntax

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 3   AsciiDoc - AsciiDoc syntax

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

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

[source,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

[source,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

[source,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

[source,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

[source,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

[source,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

[source,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

[source,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](asciidoc-internal.adoc)

results matching ""

    No results matching ""