blackstork-io / fabric

An open-source command-line tool for reporting workflow automation and a configuration language for reusable templates. Reporting-as-Code
https://blackstork.io/fabric/
Apache License 2.0
10 stars 0 forks source link

Render `src` and `alt` attributes in `content.image` as Go templates #163

Closed traut closed 1 week ago

traut commented 3 weeks ago

At the moment, the attribute values are treated as plain strings which limits their usability:

    section "screenshots" {
      title = "Screenshots"

      content image {
        src = "{{ index (index .data.inline.findings.hosts 1).screenshots 0 }}"
      }
    }

produces

### Screenshots

![]({{ index (index .data.inline.findings.hosts 1).screenshots 0 }})