Bissetii now has a proper shortcode to manage multi-language, relative BaseURL
link instead of the conventional Markdown. This way, it's easier to remember
one shortcode than multiple ones over the place and easily manage the link
across multiple outputs.
By default, Hugo is not able to process irregular BaseURL such as
https://zoralab.gitlab.io/bissetii. In fact, it only recognizes
https://zoralab.gitlab.io its base URL. This is not feasible for websites
hosted on Git version control platforms
such as Github Pages and
GitLab Pages as
project-level pages. Therefore, the need for an independent link shortcode is
required.
Also, when using link shortcode in multiple outputs with non-base relative
URL (e.g. some/path), it will process and point the link towards its
designated output (e.g. AMP will have index.amp.html in the end if no file is
specified).
This shortcode is available starting from v1.12.0.
Heads-Up
While the shortcode is useful, it breaks the Markdown syntax conventions
due to Hugo specific shortcode feature. Therefore, when using other Markdown
renderer, these shortcodes would be rendered as text instead of HTML code
fragments.
Be careful and stay safe while using this shortcode. It allows any form of HTML
to be embedded into your Markdown page.
Using link
There are serveral ways to use link shortcode.
URL-Only Construction
link is capable of constructing the canonical, multi-lingual URL-only output.
This is useful when you just want to use the URL for inserting into linking
area.
To use URL-only construction, you can do the following pattern:
1
{{< link<URL> <LANG> "url-only" />}}
The 1st parameter (<URL>) is the URL you want to construct. It accepts both
absolute and relative URL.
The 2nd parameter is the language prefix selection (<LANG>). This is only
used for relative URL conversion. To ensure dynamic processing, you can
supply "this" as value to use current URL’s language prefix.
The 3rd parameter MUST be hard-coded into "url-only" as value.
# Supplying Absolute Value
{{< link"https://www.example.com""""url-only" />}}
⥥
https://www.example.com
# Supplying Absolute Value with language prefix
{{< link"https://www.example.com""this""url-only" />}}
⥥
https://www.example.com
# Relative to Base URL (e.g. to access static files)
{{< link"/img/logo.png""""url-only" />}}
⥥
https://bissetii.zoralab.com/img/logo.png
# Relative to Base URL with language Prefix as "zh-hans"
{{< link"/img/logo.png""zh-hans""url-only" />}}
⥥
https://bissetii.zoralab.com/zh-hans/img/logo.png
# Path/Directory relative to Base URL
{{< link"/img/""""url-only" />}}
⥥
https://bissetii.zoralab.com/img/
# Path/Directory (no tail) relative to Base URL
{{< link"/img""""url-only" />}}
⥥
https://bissetii.zoralab.com/img/
# Path/Directory relative to Base URL with "this" language prefix
{{< link"/img/""this""url-only" />}}
⥥
https://bissetii.zoralab.com/en/img/
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{< link"/img""this""url-only" />}}
⥥
https://bissetii.zoralab.com/en/img/
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{< link"/img/""zh-hans""url-only" />}}
⥥
https://bissetii.zoralab.com/zh-hans/img/
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{< link"/img""zh-hans""url-only" />}}
⥥
https://bissetii.zoralab.com/zh-hans/img/
# Relative to current URL (without leading "/" slash)
{{< link"img/logo.png""""url-only" />}}
⥥
https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png
# Relative to current URL with language prefix overwrite to "zh-hans"
{{< link"img/logo.png""zh-hans""url-only" />}}
⥥
https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png
# Relative to current URL using the current language prefix `this`
{{< link"img/logo.png""this""url-only" />}}
⥥
https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png
# Path/Directory relative to current URL
{{< link"img/""""url-only" />}}
⥥
https://bissetii.zoralab.com/en/shortcodes/link/img/
# Path/Directory (no tail) relative to current URL
{{< link"img""""url-only" />}}
⥥
https://bissetii.zoralab.com/en/shortcodes/link/img/
# Path/Directory relative to current URL with "this" language prefix
{{< link"img/""this""url-only" />}}
⥥
https://bissetii.zoralab.com/en/shortcodes/link/img/
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{< link"img""this""url-only" />}}
⥥
https://bissetii.zoralab.com/en/shortcodes/link/img/
# Path/Directory relative to current URL with "zh-hans" language prefix
{{< link"img/""zh-hans""url-only" />}}
⥥
https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{< link"img""zh-hans""url-only" />}}
⥥
https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/
Closing Tag
For version v1.12.5 and below, close tag is done by supplying the first
parameter as hard-coded "close" value as such:
{{< link"close" >}}
⥥
</a>
HTML Link Tag
link is also primarily used for generating a full-fletch HTML <a> tag. This
is the default behavior for generating the HTML <a> tag with any supported
attributes.
We will walk through each parameter for creating the HTML link tag.
Link URL
The 1st parameter is the URL itself. Likewise, link accepts both absolute and
relative URL with Bissetii’s own BaseURL processing.
This is a compulsory parameter. Here are the usage examples:
# Absolute link
{{% link "https://www.example.com" /%}}
⥥
<ahref="https://www.example.com"></a>
# File relative to base URL
{{% link "/img/logo.png" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"></a>
# Path/directory relative to base URL
{{% link "/img" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"></a>
# File Relative link to current URL
{{% link "img/logo.png" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"></a>
# Path/directory relative to current URL
{{% link "img" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"></a>
Language Prefix
The 2nd parameter is the specific language prefix. This is used for Bissetii
internal URL processing for relative URLs. When a language is recongized and
there is no given overwrite directive (see
Overwrite Language Hinting Link Parameter below), this shortcode will
automatically fills in hreflang= attribute.
For supporting dynamic processing, this parameter accepts "this" as a value
where it uses the current page’s language prefix instead. If the relative URL
is relative to base URL while leaving this field as empty string "" will cause
the URL relative to BaseURL.
This is a compulsory parameter. Here are the usage examples:
# Supplying Absolute Value
{{% link "https://www.example.com" "" /%}}
⥥
<ahref="https://www.example.com"></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" /%}}
⥥
<ahref="https://www.example.com"></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" /%}}
⥥
<ahref="https://www.example.com"></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"hreflang="zh-hans"></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="en"></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="en"></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="zh-hans"></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"hreflang="zh-hans"></a>
# Path/Directory relative to current URL
{{% link "img/" "" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="zh-hans"></a>
Relationship
The 3rd parameter is the link relationship. This is useful for specifying
link relationship between the current page and the linked page. One can use it
to describe links for web crawlers such as nofollow.
This parameter is optional and should be set blank ("") if the following
parameters are used.
# Supplying Absolute Value
{{% link "https://www.example.com" "" "nofollow" /%}}
⥥
<ahref="https://www.example.com"rel="nofollow"></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" "nofollow" /%}}
⥥
<ahref="https://www.example.com"rel="nofollow"></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://www.example.com"rel="nofollow"></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"rel="nofollow"></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"rel="nofollow"hreflang="zh-hans"></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"rel="nofollow"></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"rel="nofollow"></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"rel="nofollow"hreflang="en"></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"rel="nofollow"hreflang="en"></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"rel="nofollow"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"rel="nofollow"hreflang="zh-hans"></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"rel="nofollow"hreflang="en"></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"rel="nofollow"hreflang="en"></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"rel="nofollow"hreflang="zh-hans"></a>
# Path/Directory relative to current URL
{{% link "img/" "" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"rel="nofollow"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"rel="nofollow"hreflang="en"></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"rel="nofollow"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"rel="nofollow"hreflang="en"></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"rel="nofollow"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" "nofollow" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"rel="nofollow"hreflang="zh-hans"></a>
Target Action
The 4th parameter is the link target action. This is useful for specifying
the link action upon clicked like opening the linked page in a new tab or
windows.
This parameter is optional and should be set blank ("") if the following
parameters are used.
# Supplying Absolute Value
{{% link "https://www.example.com" "" "" "_blank" /%}}
⥥
<ahref="https://www.example.com"target="_blank"></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" "" "_blank" /%}}
⥥
<ahref="https://www.example.com"target="_blank"></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://www.example.com"target="_blank"></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"target="_blank"></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"hreflang="zh-hans"target="_blank"></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"target="_blank"></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"target="_blank"></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="en"target="_blank"></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="en"target="_blank"></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="zh-hans"target="_blank"></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="zh-hans"target="_blank"></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"target="_blank"></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"target="_blank"></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"hreflang="zh-hans"target="_blank"></a>
# Path/Directory relative to current URL
{{% link "img/" "" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"target="_blank"></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"target="_blank"></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"target="_blank"></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"target="_blank"></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="zh-hans"target="_blank"></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" "" "_blank" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="zh-hans"target="_blank"></a>
Class
The 5th parameter is the class attribute for link. This is useful for CSS
styling using class tag.
This parameter is optional and should be set blank ("") if the following
parameters are used.
# Supplying Absolute Value
{{% link "https://www.example.com" "" "" "" "button" /%}}
⥥
<ahref="https://www.example.com"class="button"></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" "" "" "button" /%}}
⥥
<ahref="https://www.example.com"class="button"></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://www.example.com"class="button"></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"class="button"></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"class="button"hreflang="zh-hans"></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"class="button"></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"class="button"></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"class="button"hreflang="en"></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"class="button"hreflang="en"></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"class="button"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"class="button"hreflang="zh-hans"></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"class="button"hreflang="en"></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"class="button"hreflang="en"></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"class="button"hreflang="zh-hans"></a>
# Path/Directory relative to current URL
{{% link "img/" "" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"class="button"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"class="button"hreflang="en"></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"class="button"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"class="button"hreflang="en"></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"class="button"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" "" "" "button" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"class="button"hreflang="zh-hans"></a>
ID Tagging
Starting from version v1.13.0, you can set a link with ID tagging
(id= attribute in HTML link tag) with the 6th parameters.
This parameter is optional and should be set blank ("") if the following
parameters are used.
# Supplying Absolute Value
{{% link "https://www.example.com" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://www.example.com"id="my-id"></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" "" "" "" "my-id" /%}}
⥥
<ahref="https://www.example.com"id="my-id"></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://www.example.com"id="my-id"></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"id="my-id"></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"id="my-id"hreflang="zh-hans"></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"id="my-id"></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"id="my-id"></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"id="my-id"hreflang="en"></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"id="my-id"hreflang="en"></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"id="my-id"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"id="my-id"hreflang="zh-hans"></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"id="my-id"hreflang="en"></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"id="my-id"hreflang="en"></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"id="my-id"hreflang="zh-hans"></a>
# Path/Directory relative to current URL
{{% link "img/" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"id="my-id"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"id="my-id"hreflang="en"></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"id="my-id"hreflang="en"></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"id="my-id"hreflang="en"></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"id="my-id"hreflang="zh-hans"></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" "" "" "" "my-id" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"id="my-id"hreflang="zh-hans"></a>
Downloadable Link
Starting from version v1.13.0, you can set a link to be downloadable
(download attribute in HTML link tag) with the 7th parameters.
This parameter is optional and should be set blank ("") if the following
parameters are used.
# Supplying Absolute Value
{{% link "https://www.example.com" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://www.example.com"download></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" "" "" "" "" "download" /%}}
⥥
<ahref="https://www.example.com"download></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://www.example.com"download></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"download></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"hreflang="zh-hans"download></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"download></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"download></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="en"download></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="en"download></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="zh-hans"download></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="zh-hans"download></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"download></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="en"download></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"hreflang="zh-hans"download></a>
# Path/Directory relative to current URL
{{% link "img/" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"download></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"download></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"download></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="en"download></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="zh-hans"download></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" "" "" "" "" "download" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="zh-hans"download></a>
Overwrite Language Hinting Link
Starting from version v1.13.0, you can overwrite the default language hinting
(hreflang= attribute in HTML link tag) with the 8th parameters.
This parameter is optional and should be set blank ("") if the following
parameters are used.
# Supplying Absolute Value
{{% link "https://www.example.com" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://www.example.com"hreflang="overwrite"></a>
# Supplying Absolute Value with 'this' language prefix
{{% link "https://www.example.com" "this" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://www.example.com"hreflang="overwrite"></a>
# Supplying Absolute Value with 'zh-hans' language prefix
{{% link "https://www.example.com" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://www.example.com"hreflang="overwrite"></a>
# Relative to Base URL (e.g. to access static files)
{{% link "/img/logo.png" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/logo.png"hreflang="overwrite"></a>
# Relative to Base URL with language Prefix as "zh-hans"
{{% link "/img/logo.png" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/logo.png"hreflang="overwrite"></a>
# Path/Directory relative to Base URL
{{% link "/img/" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"hreflang="overwrite"></a>
# Path/Directory (no tail) relative to Base URL
{{% link "/img" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/img/"hreflang="overwrite"></a>
# Path/Directory relative to Base URL with "this" language prefix
{{% link "/img/" "this" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="overwrite"></a>
# Path/Directory (no tail) relative to Base URL with "this" language prefix
{{% link "/img" "this" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/img/"hreflang="overwrite"></a>
# Path/Directory relative to Base URL with "zh-hans" language prefix
{{% link "/img/" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="overwrite"></a>
# Path/Directory (no tail) relative to Base URL with "zh-hans" language prefix
{{% link "/img" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/img/"hreflang="overwrite"></a>
# Relative to current URL (without leading "/" slash)
{{% link "img/logo.png" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="overwrite"></a>
# Relative to current URL using the current language prefix `this`
{{% link "img/logo.png" "this" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/logo.png"hreflang="overwrite"></a>
# Relative to current URL with language prefix overwrite to "zh-hans"
{{% link "img/logo.png" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/logo.png"hreflang="overwrite"></a>
# Path/Directory relative to current URL
{{% link "img/" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="overwrite"></a>
# Path/Directory (no tail) relative to current URL
{{% link "img" "" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="overwrite"></a>
# Path/Directory relative to current URL with "this" language prefix
{{% link "img/" "this" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="overwrite"></a>
# Path/Directory (no tail) relative to current URL with "this" language prefix
{{% link "img" "this" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/en/shortcodes/link/img/"hreflang="overwrite"></a>
# Path/Directory relative to current URL with "zh-hans" language prefix
{{% link "img/" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="overwrite"></a>
# Path/Directory (no tail) relative to current URL with "zh-hans" language prefix
{{% link "img" "zh-hans" "" "" "" "" "" "overwrite" /%}}
⥥
<ahref="https://bissetii.zoralab.com/zh-hans/shortcodes/link/img/"hreflang="overwrite"></a>
Inner Content
Lastly, starting from version v1.13.0, all links now have a inner content
wrapper (notice the above has self-closing tag / in the end. This wrapper
allows one to wrap the link content easily.
The content format is parsed according to the following sequence:
If partial name is given (e.g. custom/myCode.html for
layouts/partials/custom/myCode.html) and the file exists, the partial
file will be parsed.
If sequence No.1 fails, then the content will be parsed as Markdown format.
If HTML related errors are detected from sequence No.2, the content will
resort to the final format: HTML.
It is ultimately your responsibility to ensure the content are working across
multiple output formats. Please keep in mind that a shortcode can be used in
another shortcodes.
Here are some of the examples with image shortcode used inside the link
shortcode inner content for multiple output format friendliness: