Hi,
i got this MD-File Structure
profiles:
profile1:
name: "Dr. Max Maier"
office: "Head of Office"
mail: "m.maier@mail.com"
linkedin: ""
imageSRC: "m.maier@mail.com"
imageALT: "Max Maier"
profile2:
name: "Stefan Schmidt"
office: "Communities & Cooperations"
mail: "stefan.schmidt@mail.com"
linkedin: "https://www.linkedin.com/in/123456789"
imageSRC: "profile_picture.png"
imageALT: "Stefan Schmidt"
profile2:
name: "Max Müller"
office: "Communities & Cooperations"
mail: "max.mueller@mail.com"
linkedin: ""
imageSRC: "profile_picture.png"
imageALT: "Max Müller Picture"
and in the HTML File i try to get the infos like this
{{ if .Params.profiles }}
{{ range .Params.profiles }}
<div class="profiles">
<img src="/images/about_us/{{ .imagesrc }}" alt="{{ .imagealt }}" class="profiles_image">
<span class="profiles_name">{{ .name }}</span>
<span class="profiles_office">{{ .office }}</span>
<a href="mailto:{{ .mail }}" title="E-Mail to {{ .name }}"><img src="/images/icons/other/icon_yellow_mail.svg" alt="E-Mail icon" class="profiles_mail"></a>
{{ if .linkedin }}
<a href="{{ .linkedin }}" target="_blank" title="LinkedIn profile from {{ .name }}"><img src="/images/icons/other/icon_yellow_linkedin.svg" alt="LinkedIn icon" class="profiles_linkedin"></a>
{{ end }}
</div>
{{ end }}
{{ end }}
The error:
ERROR 2019/10/15 08:40:08 Rebuild failed:
ERROR 2019/10/15 08:40:08 Process: loading templates:
"/Users/daniellassak/Documents/GitLab/XXXX/themes/XXXX/layouts/page/single.html:19:1": parse
failed: template: page/single.html:19: unexpected unrecognized character in action: U+00A0 in
command
I know that i use the {{ if .linkedin }} wrong. But what is the correct format for this?