Note '/static' is absolute in 'StaticFiles' docs.

This commit is contained in:
Jeb Rosen 2020-07-19 09:24:20 -07:00 committed by Sergio Benitez
parent 0ad1c49ddd
commit 2fb6d00b24
1 changed files with 9 additions and 9 deletions

View File

@ -126,7 +126,7 @@ impl std::ops::BitOr for Options {
/// ///
/// # Example /// # Example
/// ///
/// To serve files from the `/static` local file system directory at the /// To serve files from the `/static` directory on the local file system at the
/// `/public` path, allowing `index.html` files to be used to respond to /// `/public` path, allowing `index.html` files to be used to respond to
/// requests for a directory (the default), you might write the following: /// requests for a directory (the default), you might write the following:
/// ///
@ -142,16 +142,16 @@ impl std::ops::BitOr for Options {
/// ``` /// ```
/// ///
/// With this, requests for files at `/public/<path..>` will be handled by /// With this, requests for files at `/public/<path..>` will be handled by
/// returning the contents of `./static/<path..>`. Requests for _directories_ at /// returning the contents of `/static/<path..>`. Requests for _directories_ at
/// `/public/<directory>` will be handled by returning the contents of /// `/public/<directory>` will be handled by returning the contents of
/// `./static/<directory>/index.html`. /// `/static/<directory>/index.html`.
/// ///
/// If your static files are stored relative to your crate and your project is /// `/static` is an absolute path. If your static files are stored relative to
/// managed by Cargo, you should either use a relative path and ensure that your /// your crate and your project is managed by Cargo, you should either use a
/// server is started in the crate's root directory or use the /// relative path and ensure that your server is started in the crate's root
/// `CARGO_MANIFEST_DIR` to create an absolute path relative to your crate root. /// directory or use the `CARGO_MANIFEST_DIR` environment variable to create an
/// For example, to serve files in the `static` subdirectory of your crate at /// absolute path relative to your crate root. For example, to serve files in
/// `/`, you might write: /// the `static` subdirectory of your crate at `/`, you might write:
/// ///
/// ```rust,no_run /// ```rust,no_run
/// # extern crate rocket; /// # extern crate rocket;