rdxl_static

Crates.iordxl_static
lib.rsrdxl_static
version0.0.38
sourcesrc
created_at2020-07-18 21:13:16.379503
updated_at2020-08-01 01:45:58.750614
descriptionStatic Site Generation Utilities for RDXL
homepage
repositoryhttps://github.com/andrew-johnson-4/rdxl_static
max_upload_size
id266680
size17,102
Andrew Johnson (andrew-johnson-4)

documentation

README

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.

Commit count: 46

cargo fmt