Skip to content

Commit 23e1bf8

Browse files
committed
Use a few mdbook admonitions
1 parent 5d5d921 commit 23e1bf8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

docs/api/extensions.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ end
5757
5858
The `around_blueprint_init` hook runs the first time a new Blueprint is used during a render cycle. It can be used by extensions to perform time-saving setup before a render.
5959

60+
> [!IMPORTANT]
61+
> `around_blueprint_init` **must** yield, otherwise a `Blueprinter::Errors::ExtensionHook` will be raised.
62+
6063
```ruby
6164
def around_blueprint_init(ctx)
6265
perform_setup ctx.blueprint, ctx.options
6366
yield ctx
6467
end
6568
```
6669

67-
`around_blueprint_init` MUST yield, otherwise a `Blueprinter::Errors::ExtensionHook` will be raised.
68-
6970
### around_serialize_object
7071

7172
> **param** [Object Context](./context-objects.md#object-context) \
@@ -247,7 +248,10 @@ end
247248
> **param** [Hook Context](./context-objects.md#hook-context) \
248249
> **cost** Variable - runs around all your extensions
249250
250-
The `around_hook` hook runs around all other extension hooks. It **must** yield, otherwise a `Blueprinter::Errors::ExtensionHook` will be raised. The return value from `yield` is **not** used, nor is the return value of `around_hook`.
251+
The `around_hook` hook runs around all other extension hooks. Unlike other hooks, the return value **not** used.
252+
253+
> [!IMPORTANT]
254+
> `around_hook` **must** yield, otherwise a `Blueprinter::Errors::ExtensionHook` will be raised.
251255
252256
```ruby
253257
def around_hook(ctx)

docs/introduction.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Blueprinter
22

3-
### NOTE This is a WIP for API V2!
3+
> [!WARNING]
4+
This is a WIP for API V2!
45

56
Blueprinter is a JSON serializer for your business objects. It is designed to be simple, flexible, and performant.
67

0 commit comments

Comments
 (0)