Skip to content

Commit 9e47498

Browse files
authored
Merge pull request #1662 from YJDoc2/test-book
Add a Test Book to verify style changes against
2 parents ffa8284 + b8ef89d commit 9e47498

24 files changed

+1402
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ guide/book
88

99
.vscode
1010
tests/dummy_book/book/
11+
test_book/book/
1112

1213
# Ignore Jetbrains specific files.
1314
.idea/

test_book/book.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[book]
2+
title = "mdBook test book"
3+
description = "A demo book to test and validate changes"
4+
authors = ["YJDoc2"]
5+
language = "en"
6+
7+
[rust]
8+
edition = "2018"
9+
10+
[output.html]
11+
mathjax-support = true
12+
13+
[output.html.playground]
14+
editable = true
15+
line-numbers = true
16+
17+
[output.html.search]
18+
limit-results = 20
19+
use-boolean-and = true
20+
boost-title = 2
21+
boost-hierarchy = 2
22+
boost-paragraph = 1
23+
expand = true
24+
heading-split-level = 2
25+
26+
[output.html.redirect]
27+
"/format/config.html" = "configuration/index.html"

test_book/src/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Demo Book
2+
3+
This is a simple demo book, which is intended to be used for verifying and validating style changes in mdBook.
4+
This contains dummy examples of various markdown elements and code languages, so that one can check changes made in mdBook styles.
5+
6+
This rough outline is :
7+
8+
- individual : contains basic markdown elements such as headings, paragraphs, links etc.
9+
- languages : contains a `hello world` in each of supported language to see changes in syntax highlighting
10+
- rust : contains language examples specific to rust, such as play pen, runnable examples etc.
11+
12+
This is more for checking and fixing style, rather than verifying that correct code is generated for given markdown, that is better handled in tests.

test_book/src/SUMMARY.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Summary
2+
3+
[Prefix Chapter](prefix.md)
4+
5+
---
6+
7+
- [Introduction](README.md)
8+
- [Draft Chapter]()
9+
10+
# Actual Markdown Tag Examples
11+
12+
- [Markdown Individual tags](individual/README.md)
13+
- [Heading](individual/heading.md)
14+
- [Paragraphs](individual/paragraph.md)
15+
- [Line Break](individual/linebreak.md)
16+
- [Emphasis](individual/emphasis.md)
17+
- [Blockquote](individual/blockquote.md)
18+
- [List](individual/list.md)
19+
- [Code](individual/code.md)
20+
- [Image](individual/image.md)
21+
- [Links and Horizontal Rule](individual/link_hr.md)
22+
- [Tables](individual/table.md)
23+
- [Tasks](individual/task.md)
24+
- [Strikethrough](individual/strikethrough.md)
25+
- [Mixed](individual/mixed.md)
26+
- [Languages](languages/README.md)
27+
- [Syntax Highlight](languages/highlight.md)
28+
- [Rust Specific](rust/README.md)
29+
- [Rust Codeblocks](rust/rust_codeblock.md)
30+
31+
---
32+
33+
[Suffix Chapter](suffix.md)

test_book/src/individual/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Individual Common mark tags
2+
3+
This contains following tags:
4+
5+
- Headings
6+
- Paragraphs
7+
- Line breaks
8+
- Emphasis
9+
- Blockquotes
10+
- Lists
11+
- Code blocks
12+
- Images
13+
- Links and Horizontal rules
14+
- Github tables
15+
- Github Task Lists
16+
- Strikethrough
17+
- Mixed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Blockquote
2+
3+
> This is a quoted sentence.
4+
5+
> This is a quoted paragraph
6+
>
7+
> separated lines
8+
> here
9+
10+
> Nested
11+
>
12+
> > Quoted
13+
> > Paragraph
14+
15+
> ### And now,
16+
>
17+
> **Let us _introduce_**
18+
> All kinds of
19+
>
20+
> - tags
21+
> - etc
22+
> - stuff
23+
>
24+
> 1. In
25+
> 2. The
26+
> 3. blockquote
27+
>
28+
> > cause we can
29+
> >
30+
> > > Cause we can

test_book/src/individual/code.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Code
2+
3+
This section only does simple code blocks and inline code, detailed syntax highlight and stuff is in the languages section
4+
5+
---
6+
7+
```
8+
This is a codeblock
9+
```
10+
11+
---
12+
13+
This line contains `inline code`
14+
15+
---
16+
17+
````
18+
escaping ``` in ```, fun, isn't is?
19+
````
20+
21+
---
22+
23+
```bash,editable
24+
This is an editable codeblock
25+
```
26+
27+
---
28+
29+
```rust
30+
// This links to a playpen
31+
```
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Emphasis
2+
3+
This has **bold text** in between normal.
4+
5+
This has _italic text_ in between normal.
6+
7+
A **line** having _both_, bold and italic text.
8+
9+
**A bold line _having_ italic text**
10+
11+
_An Italic line having **bold** text_
12+
13+
Now this is going **_out of hands_**.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Chapter Heading
2+
3+
---
4+
5+
# Really Big Heading
6+
7+
## Big Heading
8+
9+
### Normal-ish Heading
10+
11+
#### Small Heading...?
12+
13+
##### Really Small Heading
14+
15+
###### Is it even a heading anymore - heading

test_book/src/individual/image.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Images
2+
3+
For copyright and trademark information on these images, please check [rust-artwork repository](https://github.com/rust-lang/rust-artworkhttps://github.com/rust-lang/rust-artwork)
4+
5+
## A 16x16 image
6+
7+
![16x16 rust-lang logo](http://rust-lang.org/logos/rust-logo-16x16.png)
8+
9+
## A 32x32 image
10+
11+
![32x32 rust-lang logo](http://rust-lang.org/logos/rust-logo-32x32-blk.png)
12+
13+
## A 256x256 image
14+
15+
![256x256 rust-lang logo](http://rust-lang.org/logos/rust-logo-256x256.png)
16+
17+
## A 512x512 image
18+
19+
![512x512 rust-lang logo](http://rust-lang.org/logos/rust-logo-512x512-blk.png)
20+
21+
## A large image
22+
23+
![2018 rust-conf art](https://github.com/raw/rust-lang/rust-artwork/master/2018-RustConf/lucy-mountain-climber.png)
24+
25+
## A SVG image
26+
27+
![2018 rust-conf art svg](https://github.com/raw/rust-lang/rust-artwork/461afe27d8e02451cf9f46e507f2c2a71d2b276b/2018-RustConf/lucy-mountain-climber.svg)

0 commit comments

Comments
 (0)