Rust library to generate static websites

fix: remove unrelated changes

+1 -27
+1 -8
examples/basics/src/main.rs
··· 3 3 use maudit::{BuildOptions, BuildOutput, content_sources, coronate, routes}; 4 4 5 5 mod routes { 6 - mod another; 7 6 mod index; 8 - pub use another::Another; 9 7 pub use index::Index; 10 8 } 11 9 12 - pub use routes::Another; 13 10 pub use routes::Index; 14 11 15 12 fn main() -> Result<BuildOutput, Box<dyn std::error::Error>> { 16 - coronate( 17 - routes![Index, Another], 18 - content_sources![], 19 - BuildOptions::default(), 20 - ) 13 + coronate(routes![Index], content_sources![], BuildOptions::default()) 21 14 }
-14
examples/basics/src/routes/another.rs
··· 1 - use crate::layout::layout; 2 - use maud::html; 3 - use maudit::route::prelude::*; 4 - 5 - #[route("/another")] 6 - pub struct Another; 7 - 8 - impl Route for Another { 9 - fn render(&self, _ctx: &mut PageContext) -> impl Into<RenderResult> { 10 - Ok(layout(html! { 11 - h1 { "Hello World2" } 12 - })) 13 - } 14 - }
-3
website/assets/walrus.svg
··· 1 - <?xml version="1.0" encoding="utf-8"?> 2 - <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> 3 - <svg width="800px" height="800px" viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M450.72 418.17c-42.29-21.86-144.5-220-171.65-198.22s-40.59 114.28 0.29 171.31 132 97 153.52 129.58 18.45 57.07 13.36 63.2S262.49 462 217.66 485.53s-28.41 84.69 17.56 132.54S427 651.39 455.57 672.76s32.72 55 20.49 55-145.88-32.38-192.77-24.15-68.25 39.89 0.12 73.42 180.26 8.87 199.28 28.21 6.8 28.54-7.47 29.58-110.14-4.91-143.78 0.24 6.21 56.07 23.57 69.3 80.59 19.24 98.94 16.15 36.67-26.58 51-20.48 3.14 45.88 8.25 53 46.92 9.1 53-0.09-10.26-37.71-0.09-51 32.65 11.16 66.28-1.13 109-70.55 111-104.2-132.52 27.76-167.19 26.8c-24.48-4-34.71-21.36-19.43-30.56s228.33-55.45 244.57-96.27 4-34.68-21.47-34.63S605.6 724.45 590.26 700 791 610 813.3 555.9s29.37-119.36-0.22-127.47-147.62 137.92-194.54 130.86-1.06-21.41 19.29-48 132.36-120.51 133.32-154.16 10.08-67.32-27.65-71.33-129.27 135.84-149.69 123.63 52.89-78.61 64-143.89S632.09 133 611.7 137.14s-19.37 4.11-19.34 22.47 10.33 79.52-1.85 114.21-13.14 60.18-23.35 54.08-10.27-43.83-4.2-73.41 23.3-92.83 13.07-112.19S545.27 48.53 467.8 68s-72.25 89.86-65 136.75 27.67 83.57 45.09 128.41 21.71 94.77 2.83 85.01z" fill="#5AB286" /></svg>
-2
website/src/routes/index.rs
··· 23 23 24 24 impl Route for Index { 25 25 fn render(&self, ctx: &mut PageContext) -> impl Into<RenderResult> { 26 - let walrus = ctx.assets.add_image("assets/walrus.svg").unwrap(); 27 26 let features = [ 28 27 ("Performant", "Generate a site with thousands of pages in less than a second using minimal resources."), 29 28 ("Content", "Bring your content to life with built-in support for Markdown, custom components, syntax highlighting, and more."), ··· 44 43 div.w-full { 45 44 div."lg:container".mx-auto.relative { 46 45 div."px-4"."sm:py-8"."sm:mx-6"."sm:my-26"."my-14"."mb-20".flex.flex-col.justify-center.items-center.text-center { 47 - (walrus.render("A walrus")) 48 46 h2."sm:text-6xl"."text-5xl"."sm:w-[22ch]"."xl:w-[30ch]"."mb-2"."leading-[1.15]" { 49 47 "Lo, " span.text-brand-red { "the still scrolls of the web"} ", unchanging and steadfast, at last!" 50 48 }