#static #website #generation

rdxl_static

Static Site Generation Utilities for RDXL

37 releases

0.0.38 Aug 1, 2020
0.0.37 Jul 30, 2020

#209 in Web programming

Download history 1/week @ 2020-12-14 4/week @ 2020-12-21 1/week @ 2020-12-28 4/week @ 2021-01-04 3/week @ 2021-01-11 42/week @ 2021-01-18 2/week @ 2021-01-25 2/week @ 2021-02-01 39/week @ 2021-02-08 151/week @ 2021-02-15 2/week @ 2021-02-22 4/week @ 2021-03-01 2/week @ 2021-03-08 2/week @ 2021-03-15 76/week @ 2021-03-22 112/week @ 2021-03-29

109 downloads per month
Used in rdxl_static_template

MIT/Apache

7KB

rdxl_static

Crates.IO Documentation Build Nightly Build

Utility Crate to Compile Static Sites based on RDXL macros

#[dot_template]
pub fn custom_template(title: String, description: String, xhtml: String) -> String {
   xhtml!(
     <html>
       <head>
         <title>{{ title }}</title>
         <meta name="description" content={{description}}/>
       </head>
       <body>{{ xhtml }}</body>
     </html>
   )
}

#[dot]
fn this_function_is_a_webpage() -> String {
   dot_html!(
      <p>This webpage uses the default HTML Template.</p>
   )
}

#[dot]
fn this_function_is_also_a_webpage() -> String {
   dot_html!(
      template=custom_template,
      title="Hello World",
      description="Classic Cinematic Drama Movie Reviews",
      <p>This year was not a good year for Cinema.</p>
   )
}

There is a template for starting new sites with rdxl_static.

Dependencies

~0.6–1.1MB
~24K SLoC