I want to include my email in the readme.md file in a github repository. Of course, I want to somehow obfuscate it in order to avoid spam.
From this tutorial I read the text below:
Automatic links for email addresses work similarly, except that Markdown will also perform a bit of randomized decimal and hex entity-encoding to help obscure your address from address-harvesting spambots. For example, Markdown will turn this:
<[email protected]>into something like this:
<a href="mailto:addre ss@example.co m">address@exa mple.com</a>
I did what they said, but when I inspect the source code of the github page containing the readme file, I still can see this:
<a href="[email protected]">[email protected]</a>
Am I missing something ? It seems to me that a bot should be able to find that if it is in the source code of the web page.
I would recommend creating and embedding images of text into your HTML and Markdown documents. While soon may not be the case, most simple crawlers are not set up to detect text in images.
There are simple methods to batch generate text on a Unix command line using Image Magick (commonly installed on most servers by default). The output is fully customizable (including size, font, colors, borders, backgrounds, etc.)
Here is a simple example, adapted from a post on commandlinefu.com:
echo -e "email.address@host" | convert -background none -density 196 -resample 72 -unsharp 0x.5 -font "Courier" text:- -trim +repage -bordercolor white -border 0 email-address-image.gif
This example produces a file (email-address-image.gif) which can be embedded inline a Markdown document like so:

link to example email address image
This method requires another step of generating the image (Admittedly, which may be beyond your requirements, if you need a code snippet that can only go in your Markdown or HTML document.)
GitHub's Markdown engine does not have this feature.
It's not worth using anyway; it won't stop any modern crawlers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With