1. Hashtag Helpers
  2. Stub.by Short Links

Hashtag Helpers

Stub.by Short Links Hashtag Helper

Creates Stub.by short URLs and HTML anchor links

Stub.by is a URL shortening service that creates short links for a given URL. Stub.by short URLs use the format http://stub.by/[shortcode].

INFO

Stub.by links are valid for a default of 30 days. Set the TTL to 0 to make the short link permanent.

Syntax

Create a short URL:

        ~~#stubby_short_url#[url]

      

Create an HTML anchor link:

        ~~#stubby_short_link#[url] [ttl] [max_hits] [title]

      

Parameters

Parameter Description
url The URL to shorten
ttl Optional. Time to live in seconds. Defaults to 30 days
max_hits Optional. The maximum number of times the short link can be accessed before it expires
title Optional. Anchor text to use for stubby_short_link. If omitted, the short URL is used as the anchor text

Short URL

Use stubby_short_url when you need the short URL as a plain string.

Example definition:

loading...

Substituted definition

loading...

Use stubby_short_link when you need an HTML anchor tag.

Example definition with anchor text:

loading...

Substituted definition

loading...

The above example creates a link that remains active for 60 seconds or until it has been accessed 60 times, whichever happens first.

If no title is provided, the generated short URL is used as the anchor text.

Example definition:

loading...

Substituted definition

loading...

See also: Stubby Short URL and Stubby Short Link Handlebars helpers.