Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add mdbook-admonish support #59

Merged
merged 7 commits into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions example/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ title = "Catppuccin's mdBook"
[preprocessor]

[preprocessor.catppuccin]
assets_version = "0.2.0" # DO NOT EDIT: Managed by `mdbook-catppuccin install`
assets_version = "0.2.1" # DO NOT EDIT: Managed by `mdbook-catppuccin install`

[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "2.0.2" # do not edit: managed by `mdbook-admonish install`

[output.html]
default-theme = "mocha"
preferred-dark-theme = "mocha"
additional-css = ["./theme/catppuccin.css", "./theme/catppuccin-highlight.css"]
additional-css = ["./theme/catppuccin.css", "./theme/catppuccin-highlight.css", "./theme/mdbook-admonish.css"]
no-section-label = true
git-repository-url = "https://github.com/catppuccin/mdBook"
git-repository-icon = "fa-github"
Expand Down
3 changes: 2 additions & 1 deletion example/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Summary

- [Landing](./first.md)
- [Landing](./landing.md)
- [Admonishments](./admonish.md)
- [Super Secret](./secret.md)
81 changes: 81 additions & 0 deletions example/src/admonish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Reference

The following admonishments are implemented by the
[`mdbook-admonish`](https://github.com/tommilligan/mdbook-admonish) plugin and
are automatically themed to match Catppuccin.

## Directives

All supported directives are listed below.

`note`

```admonish note
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`abstract`, `summary`, `tldr`

```admonish abstract
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`info`, `todo`

```admonish info
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`tip`, `hint`, `important`

```admonish tip
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`success`, `check`, `done`

```admonish success
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`question`, `help`, `faq`

```admonish question
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`warning`, `caution`, `attention`

```admonish warning
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`failure`, `fail`, `missing`

```admonish failure
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`danger`, `error`

```admonish danger
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`bug`

```admonish bug
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`example`

```admonish example
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```

`quote`, `cite`

```admonish quote
Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency.
```
8 changes: 0 additions & 8 deletions example/src/first.md → example/src/landing.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,3 @@ Tables:
| Header 1 | Header 2 |
| -------- | -------- |
| Data 1 | Data 2 |

## Admonishments (NOT SUPPORTED YET - [#2](https://github.com/catppuccin/mdBook/issues/2))

> **Note**:
> This is a note!

> **Warning**:
> This is a warning!
4 changes: 2 additions & 2 deletions example/src/secret.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Super Secret

You thought you'd find something here didn't you?
You thought you'd find something here, didn't you?

Here, have a cookie for your efforts: 🍪
Here, have a cookie for your efforts: 🍪
Loading