Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Nofollow does not work for img links

Started by Niko Kaindl 8 years ago · 1 replies · 1276 views
8 years ago

In the page linking tutorial, it says you can nofollow Links like this:

[NoFollow Link](../some-page?rel=nofollow)

This does not work when put inside an div container, like :

<div class="div" markdown="1">[![ALT_TEXT](img.jpg)](https://www.website.com/?rel=nofollow)</div>

lg

Niko

last edited 08/16/18 by Niko Kaindl
8 years ago

@NEA Have you tried using <span> instead of <div> or Markdown Extra?

Using <span>:

HTML
<span>
[![ALT_TEXT](unsplash-overcast-mountains.jpg)](https://www.website.com/?rel=nofollow)
</span>

generates...

HTML
<span>
<a href="https://www.website.com/" rel="nofollow"><img alt="ALT_TEXT" src="/site-blog/user/pages/01.blog/hero-classes/unsplash-overcast-mountains.jpg"></a>
</span>

See here for explaination: How can I wrap my markdown in an HTML div?

Markdown Extra:
And according to another answer, Markdown Extra does support <div>. Markdown Extra is supported by Grav (see Grav's Mardown docs):

Grav ships with built-in support for Markdown and Markdown Extra. You must enable Markdown Extra in your system.yaml configuration file.

last edited 08/16/18 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 11 months ago
6 1126 11 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 905 1 year ago
Content & Markdown · by Jan L'Am, 2 years ago
4 796 2 years ago
Content & Markdown · by Leonardo, 2 years ago
3 716 2 years ago
Content & Markdown · by belthasar, 2 years ago
4 1124 2 years ago