Link ->

Links connect webpages. They enable readers to navigate through your website and to myriads of other sources of information or entertainment with mere clicks of a fingertip. Links make the world wide web a web.

This page discusses basic links. Aneamal also offers a few special-purpose links: links to a target on the same page, metadata links, links to unendorsed destinations and references to a footnote.

How to

A link is marked by an arrow -> made up of a hyphen and a greater-than sign. Put the address you want to link to right after the arrow like in the examples below.

If you attach the link arrow to the end of a word, then that word is used as link text. You can also attach the arrow to the end of a bare string or another string of words to use more than one word as link text.

The address can be a full URL like https://aneamal.org/translator/ or a relative address like /metadata/title or tree.jpg. An address that starts with a single slash is relative to the Aneamal root directory. A partial address without initial slash such as a mere filename is relative to the directory of the file that contains the link. Relative addresses are recommended for links between the files of your web project.

The Aneamal Translator usually figures out by itself where an address ends: at the next whitespace character, before certain Aneamal marks or before a punctuation mark that is followed by whitespace. You can make the beginning and end of an address explicit by enclosing the address in backticks `…` though.

The address must be enclosed in backticks, if it starts with any of the characters @ # , ! literally, contains whitespace or any of the characters | $ ` { ^ or -> or ends in a punctuation mark , ; : . ? !. A literal backslash must be marked as literal by adding another backslash before it.

Examples

The United Nations website ->https://www.un.org/ is multilingual.
The United Nations website->https://www.un.org/ is multilingual.
The `United Nations website`->https://www.un.org/ is multilingual.

The United Nations website https://www.un.org/ is multilingual.
The United Nations website is multilingual.
The United Nations website is multilingual.

The second example shows a short list of links with relative addresses:

Read more about …

<> `integrating linked files into the webpage`->file#linked
<> `recognized metadata names`->/metadata/

Read more about …

For developers

Links are converted to HTML a elements when Aneamal is translated to HTML. An href attribute holds the address; links without address do not get an href attribute. Links without explicit link text use the address as link text, too. The first example becomes:

<p>The United Nations website <a href='https://www.un.org/'>https://www.un.org/</a> is multilingual.<br>The United Nations <a href='https://www.un.org/'>website</a> is multilingual.<br>The <a href='https://www.un.org/'>United Nations website</a> is multilingual.</p>

The Aneamal Translator creates the full path component for relative addresses and removes .nml file extensions. Here is the second example translated to HTML:

<p>Read more about …</p>
<ul>
<li><a href='/markup/file#linked'>integrating linked files into the webpage</a></li>
<li><a href='/metadata/'>recognized metadata names</a></li>
</ul>