All Projects → martignoni → hugo-cloak-email

martignoni / hugo-cloak-email

Licence: GPL-3.0 License
A Hugo theme component to cloak email adresses

Programming Languages

HTML
75241 projects

Projects that are alternatives of or similar to hugo-cloak-email

hugo-component-matomo
Matomo user tracking and optout scripts for Hugo
Stars: ✭ 38 (-46.48%)
Mutual labels:  hugo, hugo-theme-component
hugo-atom-feed
Hugo theme component for ATOM feed custom Output Format
Stars: ✭ 29 (-59.15%)
Mutual labels:  hugo, hugo-theme-component
hugo-notice
A Hugo theme component to display nice notices
Stars: ✭ 138 (+94.37%)
Mutual labels:  hugo, hugo-theme-component
hugo-shortcodes-netlify-cms
Shortcodes of Hugo for Netlify CMS Text Editor
Stars: ✭ 50 (-29.58%)
Mutual labels:  hugo, hugo-theme-component
hugo-search-fuse-js
Hugo theme component for implementing static site search using Fuse.js
Stars: ✭ 52 (-26.76%)
Mutual labels:  hugo, hugo-theme-component
alfred-mailto
Send emails to recipients and groups from Alfred
Stars: ✭ 59 (-16.9%)
Mutual labels:  email
quartz
🌱 host your own second brain and digital garden for free
Stars: ✭ 374 (+426.76%)
Mutual labels:  hugo
hugo-bare-min-theme
A bare minimum theme for Hugo (https://gohugo.io) to help develop and debug Hugo sites -- https://hugo-bare-min.netlify.com/,
Stars: ✭ 71 (+0%)
Mutual labels:  hugo
carbon
Email library for Crystal. Testable, adapter-based, and catches bugs for you. Comes with an adapter for SendGrid.
Stars: ✭ 71 (+0%)
Mutual labels:  email
mjml-starter-kit
MJML starter kit, create responsive emails very quickly using MJML and this productive toolchain
Stars: ✭ 35 (-50.7%)
Mutual labels:  email
is-biz-mail-php
isBizMail tells you whether a given email address belongs to a free email account provider (gmail.com, yahoo.es, yandex.ru etc) or not.
Stars: ✭ 19 (-73.24%)
Mutual labels:  email
ContextIO-node
[DEPRECATED] - Official Node.js client library for the Context.IO Email API
Stars: ✭ 86 (+21.13%)
Mutual labels:  email
extract-email-address
Extracts email address from an arbitrary text input.
Stars: ✭ 45 (-36.62%)
Mutual labels:  email
hugo-geekdoc
Hugo theme made for documentation
Stars: ✭ 284 (+300%)
Mutual labels:  hugo
Networkteam.Neos.MailObfuscator
Email address obfuscation for Neos CMS
Stars: ✭ 13 (-81.69%)
Mutual labels:  email
SimpleKeylogger
Simple Keylogger with smtp to send emails on your account using python works on linux and Windows
Stars: ✭ 32 (-54.93%)
Mutual labels:  email
muil
Muil is a framework to build, maintain and manage dynamic templates using React and tools you know and love
Stars: ✭ 26 (-63.38%)
Mutual labels:  email
hugo-gh-pages
🚀 Build and Publish Your Hugo Site to GitHub Pages 🚀
Stars: ✭ 37 (-47.89%)
Mutual labels:  hugo
elixir-sparkpost
SparkPost client library for Elixir https://developers.sparkpost.com
Stars: ✭ 43 (-39.44%)
Mutual labels:  email
Binario
Responsive card-based & code-light Hugo theme
Stars: ✭ 79 (+11.27%)
Mutual labels:  hugo

hugo-cloak-email

Awesome

About

This Hugo theme component provides a shortcode.

Features

Shortcode cloakemail cloakes e-mail or other messaging (xmpp, tg, etc.) or phone (sip, tel, etc.) addresses from spamming bots.

Mandatory parameter

Address to cloak, e.g.

{{< cloakemail "[email protected]" >}}

or via named address paramater:

{{< cloakemail address="[email protected]" >}}

Don't indicate other URI parameters, for instance to indicate an e-mail subject. For such feature, use instead optional query parameter (see below).

Optional parameters

  • Use protocol to specify the protocol: {{< cloakemail address="[email protected]" protocol="xmpp" >}} or {{< cloakemail address="+1 212 664-7665" protocol="tel" >}}
  • Use display to display any text on the page instead of the address: {{< cloakemail address="[email protected]" display="Send us a mail!" >}}
  • Use class to indicate CSS classes to use: {{< cloakemail address="[email protected]" class="vip company-a" >}}
  • Use query to specify a e-mail subject or other URI parameters (URI query): {{< cloakemail address="[email protected]" query="subject=Message from contact form" >}}. The query is never printed on the web page.

All parameters can be combined.

How it works

Given address [email protected], the shortcode

  • Writes <span class="cloaked-e-mail" data-user="eod.enaj" data-domain="moc.elpmaxe"></span> in the web page.
  • A CSS rule reverses the strings back to their original values and concatenates them with @ in-between. No link is available yet.
  • A Javascript builds then the link by creating a <a href=...> element.

Installation

  1. Add the hugo-cloak-email as a submodule to be able to get upstream changes later git submodule add https://github.com/martignoni/hugo-cloak-email.git themes/hugo-cloak-email
  2. Add hugo-cloak-email as the left-most element of the theme list variable in your site's or theme's configuration file config.yaml or config.toml. Example, with config.yaml:
    theme: ["hugo-cloak-email", "my-theme"]
    or, with config.toml,
    theme = ["hugo-cloak-email", "my-theme"]
  3. In your site, use the shortcode, this way:
    {{< cloakemail "[email protected]" >}}
    or
    {{< cloakemail address="[email protected]" >}}
  4. You may specify parameters (see above)

Credits

Copyright © 2019 onwards, Nicolas Martignoni [email protected].

Thanks to @mxmehl for ideas and explanations about other protocols and script fingerprinting.

This theme component was possible because of the work done by @danieka in this pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].