diff options
| author | Reorx <novoreorx@gmail.com> | 2022-05-19 16:38:00 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-05-19 16:38:00 +0800 |
| commit | 6159f68a27198e182ee9ffe095425a8bd2f41705 (patch) | |
| tree | 9ed0f7dd3a9a78b6fd10e169adce08528cfa0bdd | |
| parent | 5c968f59a21c976bc9a636df52bac68dcda38a6b (diff) | |
allow using Params.Email
| -rw-r--r-- | layouts/partials/home_info.html | 2 | ||||
| -rw-r--r-- | layouts/partials/social_icons.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html index 3127da4..12ae6c5 100644 --- a/layouts/partials/home_info.html +++ b/layouts/partials/home_info.html @@ -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 -}} diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html index 7a6cfbe..4949abb 100644 --- a/layouts/partials/social_icons.html +++ b/layouts/partials/social_icons.html @@ -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 }} |
