/website

The Mobus Operandi website

Primary LanguageRustMIT LicenseMIT

Requirements

  1. The Rust toolchain specified in rust-toolchain.toml.
  2. Node.js and an $ npm install.

Get help from the CLI

$ cargo run -- --help

Architecture

  1. The website content is generated at build time, except for the calendars.
  2. The calendars are generated at runtime, except for the contents of the calendar event element.

Build time generated content

  1. All content is generated by components.

  2. A component is a type that implements maud::Render.

  3. A component Foo and its implementations are in a module crate::components::foo.

  4. The crate::components module re-exports all the components.

  5. Components are never imported directly into scope. Instead, the crate::components module is brought into scope. A component Foo is referred to as components::Foo.

  6. Component fields are pub(crate). No constructor methods. An example of how a component is used:

    html! {
      (components::Foo {
        a: 1
      })
    }
  7. Some types that implement maud::Render are not components. This is because they are used as HTML attribute values. The maud::Render trait is used for attribute values, as well.