Rust library to generate static websites
5
fork

Configure Feed

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

chore(release): bump versions and changelogs

* chore(release): bump versions and changelogs

* fix: remove unwanted changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com>

authored by

github-actions[bot]
github-actions[bot]
Princesseuh
and committed by
GitHub
e05446fd 398e2ca3

+110 -109
-7
.sampo/changesets/cantankerous-wavetamer-akka.md
··· 1 - --- 2 - packages: 3 - - maudit-macros 4 - release: minor 5 - --- 6 - 7 - Update generated code to support returning properties in dynamic routes.
-7
.sampo/changesets/jovial-forgemaster-hiisi.md
··· 1 - --- 2 - packages: 3 - - maudit-cli 4 - release: patch 5 - --- 6 - 7 - Improve performance
-51
.sampo/changesets/resolute-thunderbearer-kullervo.md
··· 1 - --- 2 - packages: 3 - - maudit 4 - release: minor 5 - --- 6 - 7 - Adds support for dynamic routes with properties. In addition to its parameters, a dynamic route can now provide additional properties that can be used during rendering. 8 - 9 - ```rs 10 - use maudit::page::prelude::*; 11 - 12 - #[route("/posts/[slug]")] 13 - pub struct Post; 14 - 15 - #[derive(Params, Clone)] 16 - pub struct Params { 17 - pub slug: String, 18 - } 19 - 20 - #[derive(Clone)] 21 - pub struct Props { 22 - pub title: String, 23 - pub content: String, 24 - } 25 - 26 - impl Page<Params, Props> for Post { 27 - fn render(&self, ctx: &mut RouteContext) -> RenderResult { 28 - let params = ctx.params::<Params>(); 29 - let props = ctx.props::<Props>(); 30 - 31 - format!( 32 - "<h1>{}</h1><p>{}</p><small>Slug: {}</small>", 33 - props.title, props.content, params.slug 34 - ).into() 35 - } 36 - 37 - fn routes(&self, ctx: &mut DynamicRouteContext) -> Routes<Params, Props> { 38 - vec![Route::from_params_and_props( 39 - Params { 40 - slug: "hello-world".to_string(), 41 - }, 42 - Props { 43 - title: "Hello World".to_string(), 44 - content: "This is my first post.".to_string(), 45 - }, 46 - )] 47 - } 48 - } 49 - ``` 50 - 51 - For more information on dynamic routes, see the [Routing documentation](https://maudit.org/docs/routing/#dynamic-routes).
-34
.sampo/changesets/stalwart-lord-tursas.md
··· 1 - --- 2 - packages: 3 - - maudit 4 - release: minor 5 - --- 6 - 7 - Adds support for image processing. Maudit can now resize and convert images during the build process. 8 - 9 - To process an image, add it using `ctx.assets.add_image_with_options` in your page's `render` method, specifying the desired transformations. 10 - 11 - ```rs 12 - use maudit::page::prelude::*; 13 - 14 - #[route("/image")] 15 - pub struct ImagePage; 16 - 17 - impl Page for ImagePage { 18 - fn render(&self, ctx: &mut RouteContext) -> RenderResult { 19 - let image = ctx.assets.add_image_with_options( 20 - "path/to/image.jpg", 21 - ImageOptions { 22 - width: Some(800), 23 - height: None, 24 - format: Some(ImageFormat::Png), 25 - quality: Some(80), 26 - }, 27 - )?; 28 - 29 - format!("<img src=\"{}\" alt=\"Processed Image\" />", image.url).into() 30 - } 31 - } 32 - ``` 33 - 34 - See the [Assets documentation](https://maudit.org/docs/assets/) for more details.
+3 -3
Cargo.lock
··· 2740 2740 2741 2741 [[package]] 2742 2742 name = "maudit" 2743 - version = "0.3.2" 2743 + version = "0.4.0" 2744 2744 dependencies = [ 2745 2745 "base64", 2746 2746 "blake3", ··· 2773 2773 2774 2774 [[package]] 2775 2775 name = "maudit-cli" 2776 - version = "0.4.0" 2776 + version = "0.4.1" 2777 2777 dependencies = [ 2778 2778 "axum", 2779 2779 "chrono", ··· 2854 2854 2855 2855 [[package]] 2856 2856 name = "maudit-macros" 2857 - version = "0.3.0" 2857 + version = "0.4.0" 2858 2858 dependencies = [ 2859 2859 "quote", 2860 2860 "syn 2.0.106",
+8
crates/maudit-cli/CHANGELOG.md
··· 1 + # maudit-cli 2 + 3 + ## 0.4.1 4 + 5 + ### Patch changes 6 + 7 + - [52eda9e](https://github.com/bruits/maudit/commit/52eda9ea4eac8efd3efd945d00f39a1b99f284ab) Improve performance — Thanks @Princesseuh! 8 +
+2 -2
crates/maudit-cli/Cargo.toml
··· 1 1 [package] 2 2 name = "maudit-cli" 3 3 description = "CLI to operate on maudit projects." 4 - version = "0.4.0" 4 + version = "0.4.1" 5 5 license = "MIT" 6 6 edition = "2021" 7 7 ··· 38 38 toml_edit = "0.22.23" 39 39 local-ip-address = "0.6.3" 40 40 flate2 = "1.0.35" 41 - quanta = "0.12.6" 41 + quanta = "0.12.6"
+8
crates/maudit-macros/CHANGELOG.md
··· 1 + # maudit-macros 2 + 3 + ## 0.4.0 4 + 5 + ### Minor changes 6 + 7 + - [52eda9e](https://github.com/bruits/maudit/commit/52eda9ea4eac8efd3efd945d00f39a1b99f284ab) Update generated code to support returning properties in dynamic routes. — Thanks @Princesseuh! 8 +
+2 -2
crates/maudit-macros/Cargo.toml
··· 2 2 name = "maudit-macros" 3 3 description = "Procedural macros for the maudit crate" 4 4 license = "MIT" 5 - version = "0.3.0" 5 + version = "0.4.0" 6 6 edition = "2021" 7 7 8 8 [lib] ··· 10 10 11 11 [dependencies] 12 12 syn = { version = "2.0", features = ["full"] } 13 - quote = "1.0" 13 + quote = "1.0"
+84
crates/maudit/CHANGELOG.md
··· 1 + # maudit 2 + 3 + ## 0.4.0 4 + 5 + ### Minor changes 6 + 7 + - [52eda9e](https://github.com/bruits/maudit/commit/52eda9ea4eac8efd3efd945d00f39a1b99f284ab) Adds support for image processing. Maudit can now resize and convert images during the build process. 8 + 9 + To process an image, add it using `ctx.assets.add_image_with_options` in your page's `render` method, specifying the desired transformations. 10 + 11 + ```rs 12 + use maudit::page::prelude::*; 13 + 14 + #[route("/image")] 15 + pub struct ImagePage; 16 + 17 + impl Page for ImagePage { 18 + fn render(&self, ctx: &mut RouteContext) -> RenderResult { 19 + let image = ctx.assets.add_image_with_options( 20 + "path/to/image.jpg", 21 + ImageOptions { 22 + width: Some(800), 23 + height: None, 24 + format: Some(ImageFormat::Png), 25 + quality: Some(80), 26 + }, 27 + )?; 28 + 29 + format!("<img src=\"{}\" alt=\"Processed Image\" />", image.url).into() 30 + } 31 + } 32 + ``` 33 + 34 + See the [Assets documentation](https://maudit.org/docs/assets/) for more details. — Thanks @Princesseuh! 35 + - [52eda9e](https://github.com/bruits/maudit/commit/52eda9ea4eac8efd3efd945d00f39a1b99f284ab) Adds support for dynamic routes with properties. In addition to its parameters, a dynamic route can now provide additional properties that can be used during rendering. 36 + 37 + ```rs 38 + use maudit::page::prelude::*; 39 + 40 + #[route("/posts/[slug]")] 41 + pub struct Post; 42 + 43 + #[derive(Params, Clone)] 44 + pub struct Params { 45 + pub slug: String, 46 + } 47 + 48 + #[derive(Clone)] 49 + pub struct Props { 50 + pub title: String, 51 + pub content: String, 52 + } 53 + 54 + impl Page<Params, Props> for Post { 55 + fn render(&self, ctx: &mut RouteContext) -> RenderResult { 56 + let params = ctx.params::<Params>(); 57 + let props = ctx.props::<Props>(); 58 + 59 + format!( 60 + "<h1>{}</h1><p>{}</p><small>Slug: {}</small>", 61 + props.title, props.content, params.slug 62 + ).into() 63 + } 64 + 65 + fn routes(&self, ctx: &mut DynamicRouteContext) -> Routes<Params, Props> { 66 + vec![Route::from_params_and_props( 67 + Params { 68 + slug: "hello-world".to_string(), 69 + }, 70 + Props { 71 + title: "Hello World".to_string(), 72 + content: "This is my first post.".to_string(), 73 + }, 74 + )] 75 + } 76 + } 77 + ``` 78 + 79 + For more information on dynamic routes, see the [Routing documentation](https://maudit.org/docs/routing/#dynamic-routes). — Thanks @Princesseuh! 80 + 81 + ### Patch changes 82 + 83 + - Updated dependencies: maudit-macros@0.4.0 84 +
+3 -3
crates/maudit/Cargo.toml
··· 4 4 documentation = "https://docs.rs/maudit" 5 5 homepage = "https://maudit.org" 6 6 repository = "https://github.com/bruits/maudit" 7 - version = "0.3.2" 7 + version = "0.4.0" 8 8 license = "MIT" 9 9 edition = "2024" 10 10 ··· 36 36 thumbhash = "0.1.0" 37 37 base64 = "0.22.1" 38 38 39 - maudit-macros = { path = "../maudit-macros", version = "0.3" } 39 + maudit-macros = { path = "../maudit-macros", version = "0.4.0" } 40 40 log = { version = "0.4", features = ["kv"] } 41 41 env_logger = "0.11.5" 42 42 chrono = "0.4.39" ··· 47 47 blake3 = "1.8.2" 48 48 oxc_sourcemap = "4.1.0" 49 49 rayon = "1.11.0" 50 - quanta = "0.12.6" 50 + quanta = "0.12.6"