maud/docs
Chris Wong dc6c88fae3
Disallow slashes (/) in void elements ()
# Overview

The following syntax will no longer work:

```rust
html! {
    br /
    link rel="stylesheet" href="styles.css" /
}
```

This should be changed to the following:

```rust
html! {
    br;
    link rel="stylesheet" href="styles.css";
}
```

# Rationale

The `;` syntax was introduced in ; the rationale for it can be found there.

Removing support for the older `/` syntax will simplify the API surface, and allow for the space to be used for other things.
2021-11-07 23:17:15 +11:00
..
content Disallow slashes (/) in void elements () 2021-11-07 23:17:15 +11:00
src Enforce merged imports () 2021-09-11 10:42:25 +00:00
Cargo.lock Delete maud_htmlescape package () 2021-11-06 11:33:44 +00:00
Cargo.toml Change username from lfairy to lambda-fairy 2019-09-14 13:48:59 +12:00
Makefile Fix docs version indicator to include unannotated tags () 2021-10-01 12:58:15 +00:00
README.md Run publish docs action on release 2021-01-09 19:20:15 +13:00
styles.css Remove horizontal body padding in docs site 2021-11-01 16:52:55 +11:00
watch.sh In watch script, exclude built files from watch 2019-03-24 14:56:44 +13:00

Documentation

This directory contains the documentation for Maud.

Build

Build the documentation:

make

The built files will be placed in site/.

You can also delete the build artifacts with:

make clean

Watch

To ease editing, there is a ./watch.sh script that starts a web server and rebuilds the site on every change.

The script uses Python 3 and entr, but feel free to adapt it to your environment.

Add a new page

The list of pages to be built is defined by the slugs variable in the Makefile.

To add a new page, create a Markdown file in content/ and add its name (excluding the .md) to slugs:

-slugs := index getting-started basic-syntax partials ...
+slugs := index getting-started basic-syntax my-awesome-new-page partials ...

The order of the names in slugs determines the order of entries in the table of contents.

Make sure that your page starts with a heading (e.g. # My awesome new page) or it won't show up.

The navigation cache (nav.json)

The site generator constructs the table of contents dynamically by reading each Markdown page and extracting its heading. This data is cached in nav.json.

You don't need to care about this file most of the time, but it might be useful to know about it when hacking on the site generator itself.

Deployment

The documentation is built and uploaded to GitHub Pages using GitHub Actions.

The workflow is run automatically on a new release. For changes not tied to a release (e.g. typo fixes), a maintainer can trigger it manually please ask if you'd like this.