Module: HrefTag

Defined in:
href.rb

Overview

Generates an href. Note that the url should not be enclosed in quotes. By default the link includes target='_blank', which causes the link to open in a new tab or window. By default the link also includes rel=nofollow for SEO purposes.

To suppress the nofollow attribute, preface the link with the word follow. To suppress the target attribute, preface the link with the word notarget.

Examples:

General form

{% href [follow] [notarget] url text to display %}

Generates nofollow and target attributes.

{% href https://mslinn.com The Awesome %}

Does not generate nofollow or target attributes.

{% href follow notarget https://mslinn.com The Awesome %}

Does not generate nofollow attribute.

{% href follow https://mslinn.com The Awesome %}

Does not generate target attribute.

{% href notarget https://mslinn.com The Awesome %}

Author:

  • Copyright 2020 Michael Slinn

License:

  • SPDX-License-Identifier: Apache-2.0

Defined Under Namespace

Classes: ExternalHref