9

I am writing the contact page of my blog. When I put the email address in markdown format

[contact me] (myname@gmail.com)

Jekyll sees the email address as a relative path and auto-completes it to localhost:4000/myname@gmail.com locally or https://usr.github.com/myname@gmail.com when pushed to github, which leads to an unable-to-find page. In contrast, if the email address is left as it is, the address should be opened by a mail client.

Is there a way to force the email address to be absolute (disable auto-completion) or are there other workarounds?

I searched and didn't find a solution. I'll appreciate your kind help with this problem.

Sophia Feng
  • 993
  • 11
  • 16

2 Answers2

18

The correct Markdown syntax for creating an email links is:

[contact me](mailto:myname@gmail.com)
rkrv.
  • 372
  • 2
  • 10
4

Just figured out the question with Markdown Documentation. It turns out not to be a jekyll problem but a MarkDown one. I replaced the line

[contact me] (myname@gmail.com)

with

<a href="mailto:myname@gmail.com">contact me</a>

and the problem was resolved.

Probably the mailto: link is some common sense but it did trap me for a while.

Sophia Feng
  • 993
  • 11
  • 16