From 08a9c665680807d9129c4a6fc54fadd498c24e43 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 10 Jan 2024 04:03:29 +0000 Subject: [PATCH] docs(files: update readme from crate docs --- actix-files/README.md | 22 ++++++++++++++++------ justfile | 5 +++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/actix-files/README.md b/actix-files/README.md index e805d04189e..df80e4047bb 100644 --- a/actix-files/README.md +++ b/actix-files/README.md @@ -1,7 +1,5 @@ # `actix-files` -> Static file serving for Actix Web - [![crates.io](https://img.shields.io/crates/v/actix-files?label=latest)](https://crates.io/crates/actix-files) @@ -15,8 +13,20 @@ -## Documentation & Resources + + +Static file serving for Actix Web. + +Provides a non-blocking service for serving static files from disk. + +## Examples + +```rust +use actix_web::App; +use actix_files::Files; + +let app = App::new() + .service(Files::new("/static", ".").prefer_utf8(true)); +``` -- [API Documentation](https://docs.rs/actix-files) -- [Example Project](https://github.com/actix/examples/tree/master/basics/static-files) -- Minimum Supported Rust Version (MSRV): 1.68 + diff --git a/justfile b/justfile index 2142e9bc564..42979f18c97 100644 --- a/justfile +++ b/justfile @@ -14,3 +14,8 @@ doc: doc-watch: RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --features=rustls,openssl --open cargo watch -- RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly doc --no-deps --workspace --features=rustls,openssl + +# Update READMEs from crate root documentation. +update-readmes: && fmt + cd ./actix-files && cargo rdme --force + cd ./actix-router && cargo rdme --force