hugo-cloak-email
hugo-cloak-email copied to clipboard
Add option for default email address from config
I use your brilliant shortcode heavily in many projects. Now I had to change all email addresses in one of them. So this is what I am using now:
In cloakemail.html
:
{{- $address := .Get "address" | default .Site.Params.themeSettings.cloakemail -}}
config.yaml:
params:
themeSettings:
cloakemail: "[email protected]"
…
Does this make sense to you? Yet, other user might prefer a default phone number etc. So an address in this format address="emaildefault"
might make more sense.
Thank you!
Good idea. Would you prepare a PR for this?
Ok. I am happy to do that. I have that about a good and downward compatible solution. It will take a few days as I am on the road right now.
I suppose it requires cloakemail.svg
I implemented it and it says
"svgs/social/cloakemail.svg" not found render of "page" failed:
"svgs/social/" $name ".svg") (dict "width" 25 "height" 25)>: partial "svgs/social/cloakemail.svg" not found failed to render pages:
partial "svgs/social/cloakemail.svg" not found
What I did was to find email.svg file copy it as cloakemail.svg.
Absolutely nothing to do with any image. You must be confusing.
Absolutely nothing to do with any image. You must be confusing.
the error comes from the zzo theme. Theme is using svg files as icons. Anyway it is made the way it is looking for a proper svg name because it has a pattern defined. So I just copied the email.svg to cloakemail.svg and it did the job. I just thought that someone would like to know how to solve it.