qr_code
qr_code(text=, level=?, scale=?, target_dir=?)A PNG image resource of the QR code of text, with Go’s bytes and name (<target_dir>/qr_<hash>.png): level low, medium (default), quartile or high; scale pixels per module (at least 2, default 4). E.g. qr_code(text=page.permalink, target_dir="images/qr").
Arguments#
| Argument | Type | Required |
|---|---|---|
text | string | yes |
level | string | no |
scale | int | no |
target_dir | string | no |
Details#
- Kind: Function, implemented by fugo.
- Available in: every kind of template: layouts, partials, shortcodes and render hooks.
- 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.