I want to use the a theme (https://themes.gohugo.io//theme/meghna-hugo/) and do not like to write my email address in plain. So usualy I want to obfuscate it with javascript. But I guess it could be nice to have this ability to do this on other places too.
I just updated Hugo to the newest available Version: v065.3 (Mac)
in contact.yml I have:
contact:
...
contact_Details :
- icon : fas fa-at
info : "Email: {{< email >}}"
in layouts/partials/contact.html:
...
<span>{{ .info }}</span>
...
layouts/shortcodes/email.html
some html and js
And it will render as is defined in yml = htmlcode looks like the yml variable value.
Second example:
i18n/de.yaml
- id: copyright
translation: Copyright © 2019-{{< year >}}
will render with an error:
Error: add site dependencies: load resources: loading translations: "/Users/rh/Nextcloud/Website/webserver/aefachso.de/meghna-hugo/aefachso/i18n/de.yaml:1:1": failed to load translations: unable to parse translation #6 because template: Copyright © 2019-{{< year >}}:1: unexpected "<" in command
map[id:copyright translation:Copyright © 2019-{{< year >}}]
Is there a solution for these “features” or a workaround?