readme: add examples and images
34
README.md
@@ -16,7 +16,7 @@ A beautifully styled message.
|
||||
|
||||
into this:
|
||||
|
||||

|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
@@ -28,6 +28,8 @@ My example is the best!
|
||||
```
|
||||
````
|
||||
|
||||

|
||||
|
||||
See the [mkdocs-material docs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types) for a list of supported admonitions. You'll find:
|
||||
|
||||
- `info`
|
||||
@@ -42,11 +44,13 @@ and quite a few more!
|
||||
A custom title can be provided, contained in a double quoted JSON string:
|
||||
|
||||
````
|
||||
```admonish example "Simply the best"
|
||||
My example is the best!
|
||||
```admonish warning "Data loss"
|
||||
The following steps can lead to irrecoverable data corruption.
|
||||
```
|
||||
````
|
||||
|
||||

|
||||
|
||||
You can also leave out the admonition type altogether, in which case it will default to `note`:
|
||||
|
||||
````
|
||||
@@ -55,6 +59,8 @@ A plain note.
|
||||
```
|
||||
````
|
||||
|
||||

|
||||
|
||||
Markdown and HTML can be used in the inner content, as you'd expect:
|
||||
|
||||
````
|
||||
@@ -64,7 +70,21 @@ accomplished with the <span style="color: hotpink">dereference operator</span>,
|
||||
```
|
||||
````
|
||||
|
||||

|
||||

|
||||
|
||||
If you have code blocks you want to include in the content,
|
||||
use [tildes for the outer code fence](https://spec.commonmark.org/0.30/#fenced-code-blocks):
|
||||
|
||||
````
|
||||
~~~admonish bug
|
||||
This syntax won't work in Python 3:
|
||||
```python
|
||||
print "Hello, world!"
|
||||
```
|
||||
~~~
|
||||
````
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
@@ -101,6 +121,12 @@ Then, build your book as usual:
|
||||
mdbook path/to/book
|
||||
```
|
||||
|
||||
### Updates
|
||||
|
||||
**Please note**, when updating your version of `mdbook-admonish`, updated styles
|
||||
will not be applied unless you rerun `mdbook-admonish install` to update the additional
|
||||
CSS files in your book.
|
||||
|
||||
## Development
|
||||
|
||||
Project design
|
||||
|
||||
BIN
img/best-example.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
img/code-bug.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
img/complex-message.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
img/data-loss.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
img/plain-note.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |