diff --git a/pagetop/Cargo.toml b/pagetop/Cargo.toml index 970a21f1..a586c23e 100644 --- a/pagetop/Cargo.toml +++ b/pagetop/Cargo.toml @@ -83,3 +83,4 @@ pagetop-build = { version = "0.0", path = "../pagetop-build" } [package.metadata.docs.rs] all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/pagetop/src/lib.rs b/pagetop/src/lib.rs index e5d36925..36892954 100644 --- a/pagetop/src/lib.rs +++ b/pagetop/src/lib.rs @@ -96,6 +96,8 @@ //! Pero también deberán declararse explícitamente estas dependencias en cada módulo para ayudar a //! PageTop a estructurar e inicializar modularmente la aplicación. +#![cfg_attr(docsrs, feature(doc_cfg))] + // ************************************************************************************************* // RE-EXPORTED MACROS. // ************************************************************************************************* @@ -135,6 +137,7 @@ pub mod locale; pub mod html; // Acceso a base de datos. +#[cfg_attr(docsrs, doc(cfg(feature = "database")))] #[cfg(feature = "database")] pub mod db;