Asciidoc: How to use nofollow option in asciidoc document

Upasana | May 23, 2019 | 1 min read | 14 views


nofollow attribute is required on a hyperlink when you do not want to pass on the SEO page rank karma to the referring website. This is mostly used when you want to share a link of another website on your blog/website but do not want Google indexing bot to follow that link and increase target website’s page rank. Mostly comments section of any blog requires this hack.

We can use [opts=nofollow] attribute to make this work in asciidocs.

Input Asciidoc Text
https://dzone.com/articles/12-factor-or-cloud-native-apps-for-spring-develope[12-factor-or-cloud-native-apps-for-spring-developement^, opts=nofollow]
Output HTML
<a href="https://dzone.com/articles/the-12-factor-app-a-java-developers-perspective" target="_blank" rel="nofollow noopener">the-12-factor-app-a-java-developers-perspective</a>

Using ^ makes sure that the external link is opened in new window. Its shortcut for [window="_blank"]


Top articles in this category:
  1. Using Asciidoctor in Java and Spring Boot
  2. how to enable asciimath formula using mathjax in asciidoctorJ
  3. Reverting default shell to bash from Zsh in Mac OS Catalina
  4. 2factor SMS in Spring Boot App
  5. Integrating PayUmoney with your Java Server Side
  6. Integrating PayUmoney Webhooks with your Java backend

Recommended books for interview preparation:

Find more on this topic:
Buy interview books

Java & Microservices interview refresher for experienced developers.