[v0.1.0] - Add Table of Contents

pull/3/head
sgoudham 3 years ago
parent 080defaadf
commit 417a69affa
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -9,7 +9,17 @@
## Table of Contents ## Table of Contents
TODO - [mdbook-template](#mdbook-template)
* [Table of Contents](#table-of-contents)
* [Author Notes](#author-notes)
* [Installation](#installation)
* [About](#about)
* [Format](#format)
* [Valid Configurations](#valid-configurations)
* [Example](#example)
* [License](#license)
* [Contributing](#contributing)
* [Acknowledgement](#acknowledgement)
## Author Notes ## Author Notes
@ -83,42 +93,32 @@ Arguments to be replaced within the template files should be wrapped in `{}`
```markdown ```markdown
# Valid # Valid
{{#template file.txt path=../images author=Goudham}} {{#template file.txt path=../images author=Goudham}}
# Valid # Valid
{{#template
file.txt
path=../images
author=Goudham
}}
# Valid
// Not recommended but valid
{{#template file.txt path=../images author=Goudham }} {{#template file.txt path=../images author=Goudham }}
# Valid # Valid
// Not recommended but valid
{{#template // Not recommended but valid {{#template file.txt path=../images author=Goudham}}
file.txt
path=../images # Valid
author=Goudham
}} // Not recommended but valid {{#template file.txt path=../images author=Goudham }}
# Invalid # Invalid
// Use {{#include}} for simply including files
{{#template file.txt}} // Use {{#include}} for simply including files {{#template file.txt}}
# Invalid # Invalid
{{#template
file.txt {{#template file.txt path=../images author=Goudham}}
path=../images
author=Goudham}}
# Invalid # Invalid
{{#template file.txt
path=../images {{#template file.txt path=../images author=Goudham }}
author=Goudham
}}
``` ```
## Example ## Example
@ -143,6 +143,7 @@ src
and the following content and the following content
`templates/footer.md` `templates/footer.md`
```markdown ```markdown
-- Designed By {authors} -- -- Designed By {authors} --
![ferris]({path}/ferris.png) ![ferris]({path}/ferris.png)
@ -150,39 +151,43 @@ and the following content
``` ```
`rust.md` `rust.md`
```markdown ```markdown
# Rust # Rust
Some Content... Some Content...
{{#template templates/footer.md authors=Goudham, Hazel path=images}} {{#template templates/footer.md authors=Goudham, Hazel path=images}}
``` ```
`go.md` `go.md`
```markdown ```markdown
# Go # Go
Some Content... Some Content...
{{#template templates/footer.md path=images authors=Goudham, Hazel}} {{#template templates/footer.md path=images authors=Goudham, Hazel}}
``` ```
`friends/hazel.md` `friends/hazel.md`
```markdown ```markdown
# Hazel # Hazel
Some Content... Some Content...
{{#template {{#template ../templates/footer.md path=../images authors=Goudham, Hazel }}
../templates/footer.md
path=../images
authors=Goudham, Hazel
}}
``` ```
After running `mdbook build` with the mdbook-template preprocessor enabled, the files will have dynamic paths to the After running `mdbook build` with the mdbook-template preprocessor enabled, the files will have dynamic paths to the
images and contain **_identical_** content. images and contain **_identical_** content.
`rust.md` `rust.md`
```markdown ```markdown
# Rust # Rust
Some Content... Some Content...
-- Designed By Goudham, Hazel -- -- Designed By Goudham, Hazel --
@ -191,8 +196,10 @@ Some Content...
``` ```
`go.md` `go.md`
```markdown ```markdown
# Go # Go
Some Content... Some Content...
-- Designed By Goudham, Hazel -- -- Designed By Goudham, Hazel --
@ -201,8 +208,10 @@ Some Content...
``` ```
`friends/hazel.md` `friends/hazel.md`
```markdown ```markdown
# Hazel # Hazel
Some Content... Some Content...
-- Designed By Goudham, Hazel -- -- Designed By Goudham, Hazel --

Loading…
Cancel
Save