Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ jobs:
run: cargo xtask build-js

- name: Test
run: cargo test
run: cargo test --all-features
7 changes: 7 additions & 0 deletions .sampo/changesets/msrv-declaration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
cargo/maudit-cli: patch
cargo/maudit-macros: patch
cargo/oubli: patch
---

Declares a minimum supported Rust version of 1.95.
16 changes: 16 additions & 0 deletions .sampo/changesets/radiant-crownwright-ilmatar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
cargo/maudit: minor
---

Adds OpenGraph image generation behind the new `og_image` feature. Call `ctx.assets.add_opengraph_image(source)` in a route with either inline SVG markup or an existing `Image`, then `og.render()` to emit the `<meta>` tags. Requires `BuildOptions::base_url` to be set.

```rust
let og = ctx.assets.add_opengraph_image(
r##"<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630">
<rect width="100%" height="100%" fill="#1a1a1a"/>
<text x="60" y="330" fill="white" font-size="72">Hello, world!</text>
</svg>"##,
)?;

html! { head { (og.render()) } }
```
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ We're also committed to fostering a welcoming and respectful community. Any issu

## Quality Guidelines

- Prefer self-documenting code first, with expressive names and straightforward logic. Comments should explain *why* (intent, invariants, trade-offs), not *how*. Variable and function names should be clear and descriptive, not cryptic abbreviations. Avoid hidden state and side effects.
- Prefer self-documenting code first, with expressive names and straightforward logic. Comments should explain _why_ (intent, invariants, trade-offs), not _how_. Variable and function names should be clear and descriptive, not cryptic abbreviations. Avoid hidden state and side effects.
- Tests should assert observable behavior (inputs/outputs, effects), not internal implementation details. Keep tests deterministic and independent of global state.
- For errors, use typed error enums in library crates (derived with `thiserror`). Per-crate `pub type Result<T>` aliases for ergonomic signatures. Add context at the boundary (CLI) rather than deep in core, keep library error messages concise.
- Prefer `?` propagation when possible, and reserve `.expect()`/`.unwrap()` for cases where failure is a programmer bug (e.g. hardcoded regex literals, test helpers).
Expand All @@ -44,6 +44,7 @@ We're also committed to fostering a welcoming and respectful community. Any issu
Maudit uses [Sampo](https://github.com/bruits/sampo) to manage changelogs and versioning. Every user-facing change should ship with a changeset that lands in the changelog of the next release.

**Structure:**

1. **Breaking prefix (if applicable):** `**⚠️ breaking change:**`
2. **Verb:** `Added`, `Removed`, `Fixed`, `Changed`, `Deprecated`, or `Improved`.
3. **Description**.
Expand Down Expand Up @@ -71,7 +72,7 @@ For the website, the examples using Tailwind, the CLI's JavaScript pieces, and t

### Oubli

`oubli` is a sibling library that builds documentation websites *with* Maudit. It depends on `maudit` and `maud`, and will powers most of Bruits ecosystem's documentation websites. Treat it as a downstream user of `maudit`: breaking changes in `maudit`'s public API ripple here first.
`oubli` is a sibling library that builds documentation websites _with_ Maudit. It depends on `maudit` and `maud`, and will powers most of Bruits ecosystem's documentation websites. Treat it as a downstream user of `maudit`: breaking changes in `maudit`'s public API ripple here first.

### Other workspaces

Expand Down
Loading
Loading