So, I’m just getting started with Grav. Everything seems fairly simple and straightforward. I’ve got a custom config at user>config>themes>details.yaml
and have setup a blueprint at user>blueprints>config>details.yaml
. Everthing seems to be working and I’m able to use this to upload a sitewide logo image:
name: 'Hartwell Baptist Church'
address: '8732 North Cumbria Street, Golden, CO, 80401'
email: hello@abc-company.com
phone: 555-123-1111
logo:
user/themes/sitewide-assets/logo-2x.png:
name: logo-2x.png
type: image/png
size: 45966
path: user/themes/sitewide-assets/logo-2x.png
The problem I’m running into is accessing it via Twig. In liquid I’d just do this
<img src="{{config.details.logo[0].path}}" alt="{{config.details.name}}" />
But that is getting me nowhere. When I try {{config.details.logo}}
it throws an error?
What am I missing? I’ve seen similar threads on here but they didn’t seem to be trying to do the same thing. (They seem to be trying to get multiple images where I just want to add one.)