docs: use crate version in doc comment, add example outputs

This commit is contained in:
backwardspy 2022-10-23 20:09:58 +01:00
parent 6d8a72071d
commit 0c9955f05e
5 changed files with 19 additions and 5 deletions

View file

@ -87,7 +87,7 @@ Add the crate to your `Cargo.toml`:
cargo add catppuccin
```
More information and examples can be found on [crates.io](https://crates.io/crates/catppuccin), [docs.rs](https://docs.rs/catppuccin/1.0.2/catppuccin/),
More information and examples can be found on [crates.io](https://crates.io/crates/catppuccin), [docs.rs](https://docs.rs/catppuccin/latest/catppuccin/),
and in the [`rust`](https://github.com/catppuccin/palette/tree/main/rust) folder.
### Affinity

View file

@ -8,7 +8,7 @@ Add Catppuccin to your project's `Cargo.toml`:
```toml
[dependencies]
catppuccin = "1.0.0"
catppuccin = "1.0.2"
```
## Example
@ -34,11 +34,18 @@ More examples can be found
Clone the repository to run them locally:
```shell
```bash
$ cargo run --example simple
```
![Output from simple example](https://raw.githubusercontent.com/catppuccin/palette/main/rust/assets/simple-example.png)
```bash
$ cargo run --features ansi --example term
```
![Output from term example](https://raw.githubusercontent.com/catppuccin/palette/main/rust/assets/term-example.png)
## Optional Features
### ANSI string painting

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -6,7 +6,7 @@
//!
//! ```toml
//! [dependencies]
//! catppuccin = "1.0.0"
#![doc = concat!("catppuccin = \"", env!("CARGO_PKG_VERSION"), "\"")]
//! ```
//!
//! # Example
@ -32,11 +32,18 @@
//!
//! Clone the repository to run them locally:
//!
//! ```shell
//! ```bash
//! $ cargo run --example simple
//! ```
//!
//! ![Output from simple example](https://raw.githubusercontent.com/catppuccin/palette/main/rust/assets/simple-example.png)
//!
//! ```bash
//! $ cargo run --features ansi --example term
//! ```
//!
//! ![Output from term example](https://raw.githubusercontent.com/catppuccin/palette/main/rust/assets/term-example.png)
//!
//! # Optional Features
//!
//! ## ANSI string painting