Hugo source for my blog
Go to file
2019-04-06 14:15:08 +02:00
layouts/shortcodes Add "class" parameter 2019-04-06 14:03:04 +02:00
.gitignore Create .gitignore file 2019-02-05 21:38:57 +01:00
LICENSE Initial commit 2019-02-05 21:35:37 +01:00
README.md Update usage documentation 2019-04-06 14:15:08 +02:00
theme.yaml Add files to repository 2019-02-05 21:36:47 +01:00

hugo-cloak-email

Awesome

About

This is not a standalone theme. It is a Hugo theme component providing a shortcode: cloakemail to cloak any e-mail or other messaging (xmpp, tg, etc.) or phone (sip, tel, etc.) address from spamming bots.

Usage

  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 "john.doe@example.com" >}}
    
    or
    {{< cloakemail address="john.doe@example.com" >}}
    
    or, if you want to specify a protocol and/or a class,
    {{< cloakemail address="john.doe@example.com" protocol="xmpp" class="vip" >}}
    

Credits

Copyright © 2019 onwards, Nicolas Martignoni nicolas@martignoni.net.

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.