mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
expose static site generation in the launch builder and prelude
This commit is contained in:
parent
580bf666a6
commit
742721bfde
3 changed files with 26 additions and 0 deletions
|
@ -94,6 +94,20 @@ impl LaunchBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Launch your static site generation application.
|
||||||
|
#[cfg(feature = "static-generation")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "static-generation")))]
|
||||||
|
pub fn static_generation() -> LaunchBuilder<dioxus_static_site_generation::Config, SendContext>
|
||||||
|
{
|
||||||
|
LaunchBuilder {
|
||||||
|
launch_fn: |root, contexts, cfg| {
|
||||||
|
dioxus_static_site_generation::launch::launch(root, contexts, cfg)
|
||||||
|
},
|
||||||
|
contexts: Vec::new(),
|
||||||
|
platform_config: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Launch your fullstack application.
|
/// Launch your fullstack application.
|
||||||
#[cfg(feature = "mobile")]
|
#[cfg(feature = "mobile")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "mobile")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "mobile")))]
|
||||||
|
|
|
@ -104,6 +104,13 @@ pub mod prelude {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "fullstack")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "fullstack")))]
|
||||||
pub use dioxus_fullstack::prelude::*;
|
pub use dioxus_fullstack::prelude::*;
|
||||||
|
|
||||||
|
#[cfg(all(feature = "static-generation", not(feature = "fullstack")))]
|
||||||
|
#[cfg_attr(
|
||||||
|
docsrs,
|
||||||
|
doc(cfg(all(feature = "static-generation", not(feature = "fullstack"))))
|
||||||
|
)]
|
||||||
|
pub use dioxus_static_site_generation::prelude::*;
|
||||||
|
|
||||||
#[cfg(feature = "router")]
|
#[cfg(feature = "router")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "router")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "router")))]
|
||||||
pub use dioxus_router;
|
pub use dioxus_router;
|
||||||
|
|
|
@ -6,3 +6,8 @@ pub mod launch;
|
||||||
|
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
pub(crate) mod ssg;
|
pub(crate) mod ssg;
|
||||||
|
|
||||||
|
/// A prelude of commonly used items in static generation apps.
|
||||||
|
pub mod prelude {
|
||||||
|
pub use dioxus_fullstack::prelude::*;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue