Skip to content

Commit

Permalink
Add docrs attribute to generate better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
photino committed Dec 31, 2023
1 parent 099f2ca commit b970f94
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ which emphasizes **simplicity**, **extensibility** and **productivity**.
## Getting started

You can start with the example [`actix-app`], [`axum-app`] or [`dioxus-desktop`].
It requires stable **rustc 75+** to build the project.
It requires **Rust 1.75+** to build the project.

```shell
cd examples/axum-app
Expand Down
2 changes: 1 addition & 1 deletion examples/dioxus-desktop/config/config.dev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uploads = "local/uploads"

[window]
title = "DataCube"
theme = "Light"
theme = "Dark"
transparent = false

[desktop]
Expand Down
4 changes: 4 additions & 0 deletions examples/dioxus-desktop/src/view/overview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ pub fn Overview(cx: Scope) -> Element {
class: "mr-2",
src: "https://img.shields.io/github/languages/top/photino/zino",
}
img {
class: "mr-2",
src: "https://img.shields.io/badge/rustc-1.75+-blue.svg",
}
a {
class: "mr-2",
href: "https://github.com/photino/zino/tags",
Expand Down
1 change: 1 addition & 0 deletions zino-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ readme = "README.md"
[package.metadata.docs.rs]
features = ["full", "runtime-tokio"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
accessor = ["opendal"]
Expand Down
1 change: 1 addition & 0 deletions zino-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(html_favicon_url = "https://zino.cc/assets/zino-logo.png")]
#![doc(html_logo_url = "https://zino.cc/assets/zino-logo.svg")]
Expand Down
1 change: 1 addition & 0 deletions zino-extra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ readme = "README.md"
[package.metadata.docs.rs]
features = ["full"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
all-formats = ["format", "format-pdf"]
Expand Down
1 change: 1 addition & 0 deletions zino-extra/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(html_favicon_url = "https://zino.cc/assets/zino-logo.png")]
#![doc(html_logo_url = "https://zino.cc/assets/zino-logo.svg")]
Expand Down
4 changes: 4 additions & 0 deletions zino-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ repository = "https://github.com/photino/zino"
documentation = "https://docs.rs/zino-model"
readme = "README.md"

[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = [
"namespace",
Expand Down
1 change: 1 addition & 0 deletions zino-model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(html_favicon_url = "https://zino.cc/assets/zino-logo.png")]
#![doc(html_logo_url = "https://zino.cc/assets/zino-logo.svg")]
Expand Down
1 change: 1 addition & 0 deletions zino/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ readme = "README.md"
[package.metadata.docs.rs]
features = ["axum"]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
actix = [
Expand Down
1 change: 1 addition & 0 deletions zino/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(html_favicon_url = "https://zino.cc/assets/zino-logo.png")]
#![doc(html_logo_url = "https://zino.cc/assets/zino-logo.svg")]
Expand Down

0 comments on commit b970f94

Please sign in to comment.