Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Nofollow does not work for img links

Started by Niko Kaindl 8 years ago · 1 replies · 1030 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, 8 months ago
6 99 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 186 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 148 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 62 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 257 1 year ago