.
This commit is contained in:
10
Toolbox/docs/examples/sample-book/book.toml
Normal file
10
Toolbox/docs/examples/sample-book/book.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[book]
|
||||
authors = ["TSYS Group"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "Sample mdBook Project"
|
||||
|
||||
[output.html]
|
||||
git-repository-url = "https://github.com/tsysdevstack/toolbox"
|
||||
edit-url-template = "https://github.com/tsysdevstack/toolbox/edit/main/{path}"
|
||||
6
Toolbox/docs/examples/sample-book/src/SUMMARY.md
Normal file
6
Toolbox/docs/examples/sample-book/src/SUMMARY.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Summary
|
||||
|
||||
[Introduction](./chapters/intro.md)
|
||||
[Getting Started](./chapters/getting-started.md)
|
||||
[Advanced Features](./chapters/advanced.md)
|
||||
[Conclusion](./chapters/conclusion.md)
|
||||
55
Toolbox/docs/examples/sample-book/src/chapters/advanced.md
Normal file
55
Toolbox/docs/examples/sample-book/src/chapters/advanced.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Advanced Features
|
||||
|
||||
This chapter covers more advanced features of mdBook that can enhance your documentation.
|
||||
|
||||
## Adding Custom CSS
|
||||
|
||||
You can customize the look of your book by adding CSS files to a theme directory:
|
||||
|
||||
```
|
||||
mybook/
|
||||
├── book.toml
|
||||
└── src/
|
||||
├── SUMMARY.md
|
||||
└── ...
|
||||
└── theme/
|
||||
└── css/
|
||||
└── custom.css
|
||||
```
|
||||
|
||||
## Including Files
|
||||
|
||||
Use the `{{#include}}` syntax to include external files:
|
||||
|
||||
```markdown
|
||||
{{#include ../../../path/to/file.rs}}
|
||||
```
|
||||
|
||||
## Adding Math
|
||||
|
||||
Mathematical formulas are supported using KaTeX:
|
||||
|
||||
$$
|
||||
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
|
||||
$$
|
||||
|
||||
Inline math: $E = mc^2$
|
||||
|
||||
## Admonitions
|
||||
|
||||
Special blocks for notes, warnings, etc.:
|
||||
|
||||
> Note: This is a note admonition.
|
||||
|
||||
> Warning: This is a warning admonition.
|
||||
|
||||
> Tip: This is a tip admonition.
|
||||
|
||||
## Adding Interactive Elements
|
||||
|
||||
You can include HTML directly in your markdown:
|
||||
|
||||
<details>
|
||||
<summary>Click to expand</summary>
|
||||
Hidden content goes here.
|
||||
</details>
|
||||
27
Toolbox/docs/examples/sample-book/src/chapters/conclusion.md
Normal file
27
Toolbox/docs/examples/sample-book/src/chapters/conclusion.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Conclusion
|
||||
|
||||
This concludes our sample mdBook project. You now know the basics of creating documentation with mdBook.
|
||||
|
||||
## What We've Covered
|
||||
|
||||
- Setting up an mdBook project
|
||||
- Creating chapters with markdown
|
||||
- Using advanced features like math and admonitions
|
||||
- Building and serving your book
|
||||
|
||||
## Next Steps
|
||||
|
||||
Now that you understand the basics, you can:
|
||||
|
||||
1. Create your own documentation project
|
||||
2. Customize the theme and styling
|
||||
3. Add more complex content with interactive elements
|
||||
4. Deploy your book to a web server
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [Official mdBook documentation](https://rust-lang.github.io/mdBook/)
|
||||
- [Markdown guide](https://www.markdownguide.org/)
|
||||
- [TSYS Documentation & Diagrams container](https://github.com/tsysdevstack/toolbox)
|
||||
|
||||
Thank you for exploring the capabilities of mdBook with the TSYS Documentation & Diagrams container!
|
||||
@@ -0,0 +1,47 @@
|
||||
# Getting Started
|
||||
|
||||
This chapter will guide you through the basics of creating content with mdBook.
|
||||
|
||||
## Creating Your First Chapter
|
||||
|
||||
To create a new chapter:
|
||||
|
||||
1. Create a markdown file in the `src` directory
|
||||
2. Add an entry in `SUMMARY.md` to include it in the navigation
|
||||
3. Run `mdbook build` to generate the HTML
|
||||
|
||||
## Basic Markdown Syntax
|
||||
|
||||
You can use standard markdown syntax in your chapters:
|
||||
|
||||
```markdown
|
||||
# Heading 1
|
||||
## Heading 2
|
||||
### Heading 3
|
||||
|
||||
- List item 1
|
||||
- List item 2
|
||||
- List item 3
|
||||
|
||||
[Link text](path/to/page.md)
|
||||
|
||||

|
||||
```
|
||||
|
||||
## Code Blocks
|
||||
|
||||
Code blocks get syntax highlighting:
|
||||
|
||||
```rust
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
```
|
||||
|
||||
```javascript
|
||||
console.log("Hello, JavaScript!");
|
||||
```
|
||||
|
||||
```python
|
||||
print("Hello, Python!")
|
||||
```
|
||||
15
Toolbox/docs/examples/sample-book/src/chapters/intro.md
Normal file
15
Toolbox/docs/examples/sample-book/src/chapters/intro.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Introduction
|
||||
|
||||
Welcome to the Sample mdBook Project! This book demonstrates the capabilities of mdBook for creating documentation.
|
||||
|
||||
## What is mdBook?
|
||||
|
||||
mdBook is a utility to create books from markdown files. It is similar to GitBook but written in Rust.
|
||||
|
||||
## Features
|
||||
|
||||
- Write books in markdown
|
||||
- Create a book with multiple chapters
|
||||
- Automatically generated table of contents
|
||||
- Syntax highlighting for code blocks
|
||||
- Responsive design for mobile devices
|
||||
Reference in New Issue
Block a user