add_resource
add_resource(resource=)Adds the page resource resource describes: path (relative to the adapter’s directory, required), content ({mediaType, value}: a string, or a resource, which keeps its own URL), name, title, params. A path added again replaces the earlier resource. Prints nothing.
Arguments#
| Argument | Type | Required |
|---|---|---|
resource | map | yes |
Details#
- Kind: Function, implemented by fugo.
- Available in: content adapters (
_content.html) and the partials they call only. - Output: escaped like any value, unless marked
safe. - Site-bound: reads the site or the page being rendered; in a component, pass
page=or declare@__nh.