···1313Supporting certain features in your less used output mode might add technical constraints affecting your main use case, and your attention is forever split between the two universes you intend to support.
14141515**Maudit is about making static websites**. It has no higher goals than that. It won't try to become a server-side rendering framework, a hybrid framework, or anything else. This focus allows us to make the best static website generator we can.
1616+1717+## Your website changes less often than its content
1818+1919+Many parts of Maudit projects are written in Rust, a compiled language, thus requiring recompilation for changes. This overhead is justified by the assumption that structural changes are less frequent than content updates. For example, in a blog, new articles are more common than layout changes.
2020+2121+Without delving into the complexities of incremental builds, this architecture allows Maudit projects to build very quickly, even for large websites, thanks to the raw performance of a compiled language.
+76
website/content/docs/quick-start.md
···22title: "Quick Start"
33section: "getting-started"
44---
55+66+In this guide, you'll learn how to create a Maudit website and the general basis of Maudit in a few minutes of reading.
77+88+If you prefer to read more detailed explanations, including exploration of various Maudit concepts, please read the [the tutorial]().
99+1010+> This guide assumes that you have Rust installed and are familiar with the terminal.
1111+1212+## Installation
1313+1414+First install the Maudit CLI.
1515+1616+```shell
1717+cargo install maudit-cli
1818+```
1919+2020+## Generating a Maudit project
2121+2222+Run the following command to generate a Maudit project.
2323+2424+The command will suggest many templates to begin from. Some of which are usable as-is (such as the Blog example)
2525+2626+```shell
2727+maudit init
2828+```
2929+3030+Once done, `cd` into the directory you have chosen to create your project in.
3131+3232+## Running your project
3333+3434+Use the Maudit CLI to build, run in development mode or preview your project.
3535+3636+The `maudit build` command will build your project to the `dist` directory, ready to be deployed.
3737+3838+`maudit dev` will serve your website on a local server, automatically rebuilding and refreshing the page on changes.
3939+4040+`maudit preview` will serve your website on a local server with various optimization enabled to imitate what a real production server would do, and is intended to preview your built website before deploying.
4141+4242+## Creating pages
4343+4444+Pages in Maudit are created directly in Rust, using `.rs` files.
4545+4646+To create a page, create a `.rs` file with a public struct using the `route` attribute, which take the path of the route as sole parameter.
4747+4848+All of Maudit's useful imports for pages can be imported using the prelude from `maudit::page`.
4949+5050+```rust
5151+use maudit::page::prelude::*;
5252+5353+#[route("/hello-world")]
5454+pub struct HelloWorld;
5555+```
5656+5757+Every page must `impl` the `Page` trait, with the required method `render`.
5858+5959+```rust
6060+impl Page for HelloWorld {
6161+ fn render(&self, ctx: &mut RouteContext) -> RenderResult {
6262+ RenderResult::Text("Hello, world!".to_string())
6363+ }
6464+}
6565+```
6666+6767+Finally, pages' struct must be passed to the `coronate` function in the project's `main.rs`
6868+6969+```rust
7070+use pages::HelloWorld;
7171+use maudit::{coronate, routes, content_sources, BuildOptions, BuildOutput};
7272+7373+fn main() -> Result<BuildOutput, Box<dyn std::error::Error>> {
7474+ coronate(
7575+ routes![Index],
7676+ content_sources![],
7777+ BuildOptions::default()
7878+ )
7979+}
8080+```