Skip to content

Commit

Permalink
Add a style guide for the docs (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy authored Nov 29, 2021
1 parent 2f3d68c commit ca860d0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This directory contains the documentation for Maud.

It is hosted at <https://maud.lambda.xyz>.

## Build

Build the documentation:
Expand All @@ -14,6 +16,18 @@ You can also delete the build artifacts with:

make clean

## Style

- [Be brief][short].
- Use [semantic line breaks][sembr].
- American spelling.
- Parentheticals should use spaced en dashes –
like this –
not em dashes.

[short]: https://developers.google.com/tech-writing/one/short-sentences
[sembr]: https://sembr.org/

## Watch

To ease editing,
Expand Down
7 changes: 4 additions & 3 deletions docs/content/elements-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ html! {

## Optional attributes: `title=[Some("value")]`

Add optional attributes to an element using `attr=[value]` syntax, with *square*
brackets. These are only rendered if the value is `Some<T>`, and entirely
omitted if the value is `None`.
Add optional attributes to an element using `attr=[value]` syntax,
with *square* brackets.
These are only rendered if the value is `Some<T>`,
and entirely omitted if the value is `None`.

```rust
# let _ = maud::
Expand Down
6 changes: 4 additions & 2 deletions docs/content/web-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ maud = { version = "*", features = ["tide"] }
# ...
```

This adds an implementation of `From<PreEscaped<String>>` for the `Response` struct.
Once provided, callers may return results of `html!` directly as responses:
This adds an implementation of `From<PreEscaped<String>>`
for the `Response` struct.
Once provided,
callers may return results of `html!` directly as responses:

```rust,no_run
use maud::html;
Expand Down

0 comments on commit ca860d0

Please sign in to comment.