Add rel='nofollow' to Markdown front matter

Hi,

How would I go about adding rel=‘nofollow’ to the url in the front matter (YAML format) for just one specific post?

---
title: "spf13-vim 3.0 release and new website"
description: "spf13-vim is a cross platform distribution of vim plugins and resources for Vim."
date: "2012-04-06"
url: https://gohugo.io/content/front-matter/
---

Content of the file goes Here

Thanks.

rel=´nofollow´ is an attribute in a link (a href …) and has nothing to do with front matter.

I understand. I was just wondering if there’s a way to add it (somehow) to the markdown file instead of writing it out in html. Does that make sense?

In the code below, I’ve written out the post just to give you a better idea. The whole section class is just duplicating the code, but allows me to use rel='nofollow'.

    <div class="content">
      <p class="content-subhead"></p>

      <section class="post">
        <header class="post-header">
          <h2 class="post-title">
            <a href="" rel='nofollow' target="_blank"></a>
          </h2>
          <p>
          </p>
        </header>

        <div class="post-description">
          <p>
        
          </p>
        </div>
      </section>
      <div class="posts">
        {{ range .Data.Pages.ByTitle }}
          {{ .Render "summary" }}
        {{ end }}
      </div>
    </div>

OK, that makes more sense.

I don’t think it’s possible with pure markdown. But you can mix markdown and html and put a <a href … in there.

For markddown we could and should expose Blackfriday’s HTML_NOFOLLOW_LINKS setting, but that would be per page or site.

In this case, as I need it for just a post (not page or site) it seems as I’ve I’ll have to write out the html. Thanks for helping out.

With “page” I ment “a post” – or the markdown in a post. But currently, as I said, you would have to spell out the HTML yourself.