By default, Lotus Docs will open external links in a new tab.

This behaviour can be disabled by setting the extLinkNewTab parameter to false in your config:

External links are indicated by the ’external link’ icon to the right of the link text. e.g. Lotus Docs GitHub repository:

When this option is enabled, internal links feature a tooltip that displays basic information about the destination page, such as it’s parent section, title, and description.

Internal link preview tooltip

To enable tooltip previews for internal links, set the intLinkTooltip parameter to true in your config:

The link preview tooltip feature works by using a custom Markdown render hook to first validate a link is internal, and then enables the tooltip function for those links. Markdown links in your content pages can be formatted in one of two ways:

  1. Using the relref shortcode - This shortcode displays the relative permalink to a document1.

  2. Links relative to the site’s root - e.g. /docs/guides/features/docsearch/ - /docs/guides/features/docsearch/

Both these formats will enable preview tooltips on internal links. However, one benefit of using relref to link internal content is that the hugo command will produce an error if an internal link’s path is invalid.

Last updated 02 Oct 2023, 21:49 +0100 . history

Was this page helpful?