Let's say we have simple empty .Rmd
file with YAML metadata like this
---
link: https://google.com
---
Then in html
template, it will show up automatically in <a>
tag
<a href="http://google.com" class="uri">http://google.com</a>
How to force pandoc not to build <a>
when there is url in YAML? I mean what I wanna finally get is plan text in html
template
http://google.com
Or if I use own html
template I can add a link that way
<a href="$link$">Google</a>
Thanks for help!
This is caused by an extension that is enabled by default with the md_extensions
option under the output format, specifically auto_link_bare_uris
. You can disable this in your YAML header.
---
title: https://www.google.com
output:
html_document:
md_extensions: -autolink_bare_uris
---
Just note that this will affect auto linking of URIs throughout your document, not only in the title. After disabling the extension you will need to enclose links in angle brackets to create links, i.e. <https://www.google.com>
. The Pandoc guide and the R Markdown site contain the detail covering this.
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