allow using Params.Email

This commit is contained in:
Reorx 2022-05-19 16:38:00 +08:00
parent 5c968f59a2
commit 6159f68a27
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
{{- trim .Content "\n" | markdownify -}}
</section>
<footer class="entry-footer">
{{- partial "social_icons.html" (dict "icons" site.Params.socialIcons "svg" $.Site.Data.svg "MaskedEmail" site.Params.MaskedEmail) -}}
{{- partial "social_icons.html" (dict "icons" site.Params.socialIcons "svg" $.Site.Data.svg "MaskedEmail" site.Params.MaskedEmail "Email" site.Params.Email) -}}
</footer>
</article>
{{- end -}}

View File

@ -3,7 +3,7 @@
{{- $icon_name := ( trim .name " " | lower )}}
{{- if (eq .url "email") }}
<a href="mailto:{{ $.MaskedEmail }}" title="{{ .name | title }}">
<a href="mailto:{{ $.MaskedEmail | default $.Email }}" title="{{ .name | title }}">
{{ safeHTML (index $.svg $icon_name | default $.svg.default) }}
</a>
{{- else }}