Skip to main content

Module stack

Module stack 

Source
Expand description

Stack buffer for @push/@stack directives.

Forge emits placeholder tokens at @stack("name") sites and pushes content via forge::stack::push("name", "..."). After Askama renders, postprocess swaps placeholders for the accumulated buffer contents.

Functions§

drain
Drain the request-scoped buffer and return name → joined-content.
placeholder
postprocess
Replace placeholder tokens in body with their accumulated content, drained.
prepend
push
with_request_scope
Run a future with a fresh per-request stack scope.