forked from martignoni/hugo-cloak-email
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Parameters can be positional or named. - Arbitrary protocols can be given. - Fingerprint Javascript code to make it unique.
- Loading branch information
1 parent
9a71b4a
commit e62294f
Showing
2 changed files
with
22 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
## About | ||
|
||
This is not a standalone theme. It is a [Hugo](https://gohugo.io) theme component providing a shortcode: `cloakemail` to cloak any e-mail address from spamming bots. | ||
This is not a standalone theme. It is a [Hugo](https://gohugo.io) theme component providing a shortcode: `cloakemail` to cloak any e-mail or other messaging (`xmpp`, `telegram`, etc.) or phone (`tel`) address from spamming bots. | ||
|
||
## Usage | ||
|
||
|
@@ -21,9 +21,19 @@ This is not a standalone theme. It is a [Hugo](https://gohugo.io) theme componen | |
```go | ||
{{< cloakemail "[email protected]" >}} | ||
``` | ||
or | ||
```go | ||
{{< cloakemail address="[email protected]" >}} | ||
``` | ||
or, if you want to specify a protocol, | ||
```go | ||
{{< cloakemail address="[email protected]" protocol="xmpp" >}} | ||
``` | ||
|
||
### Credits | ||
|
||
Copyright © 2019 onwards, Nicolas Martignoni [email protected]. | ||
|
||
This theme component was possible because of the work done by [@danieka](https://github.com/danieka) in [this pull request](https://github.com/gohugoio/hugo/pull/3935). | ||
|
||
Thanks to [@mxmehl](https://github.com/mxmehl) for ideas and explanations about other protocols and script fingerprinting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters