qr_code

Signature
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#

ArgumentTypeRequired
textstringyes
levelstringno
scaleintno
target_dirstringno

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.

    Type to search titles, headings and text.