Rust library to generate static websites
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: reduce needed imports

+17 -12
+3 -4
crates/framework/src/lib.rs
··· 1 - pub mod assets; 1 + mod assets; 2 2 pub mod page; 3 3 pub mod params; 4 - pub mod routes; 4 + mod routes; 5 5 6 6 mod logging; 7 7 ··· 19 19 20 20 use logging::{format_elapsed_time, FormatElapsedTimeOptions}; 21 21 22 - pub use maud; 23 - pub use maudit_macros; 22 + pub use routes::Router; 24 23 25 24 pub use rustc_hash::FxHashMap; 26 25
+7
crates/framework/src/page.rs
··· 51 51 } 52 52 53 53 pub trait FullPage: Page + InternalPage + DynamicPage + Sync {} 54 + 55 + pub mod prelude { 56 + pub use super::{ 57 + DynamicPage, FullPage, InternalPage, Page, RenderResult, RouteContext, RouteParams, 58 + }; 59 + pub use maudit_macros::{route, Params}; 60 + }
+1 -1
crates/user-example/src/main.rs
··· 1 1 mod pages; 2 - use maudit::routes::Router; 2 + use maudit::Router; 3 3 4 4 #[tokio::main] 5 5 async fn main() -> Result<(), Box<dyn std::error::Error>> {
+3 -3
crates/user-example/src/pages/dynamic.rs
··· 1 - use maudit::maud::html; 2 - use maudit::maudit_macros::{route, Params}; 3 - use maudit::page::{DynamicPage, Page, RenderResult, RouteContext, RouteParams}; 1 + use maudit::page::prelude::*; 2 + 3 + use maud::html; 4 4 5 5 #[route("/[page]")] 6 6 pub struct DynamicExample;
+1 -2
crates/user-example/src/pages/endpoint.rs
··· 1 - use maudit::maudit_macros::route; 2 - use maudit::page::{Page, RenderResult, RouteContext}; 1 + use maudit::page::prelude::*; 3 2 4 3 #[route("/catalogue/data.json")] 5 4 pub struct Endpoint;
+2 -2
crates/user-example/src/pages/index.rs
··· 1 + use maudit::page::prelude::*; 2 + 1 3 use maud::html; 2 - use maudit::maudit_macros::route; 3 - use maudit::page::{InternalPage, Page, RenderResult, RouteContext}; 4 4 5 5 use super::dynamic::{DynamicExample, Params as DynamicExampleParams}; 6 6