AutoLink Extension

The AutoLink extension provide cross page automatic linking for markdown (*.md) files. This allows pages, such as those on this site, to link to each other by partial name. In the case of shortcut style linkes (see Core Extension:Shortcut links) heading content will also be include automatically.

The following table lists the available configuration options for the AutoLink extension.

Automatic Links

The link within traditional markdown links (e.g., [text](link)) may include a markdown filename. The name must be unique, but may be incomplete. The entire page hieerachy is searched and filenames are compared using the python "endswith" method. Thus, the supplied name is considered unique if only one path from all possible paths ends with the supplied text, see Example 1.

The markdown filename link also supports html bookmark style links, as shown in Example 2.

Automatic Link Shortcuts

Markdown syntax includes syntax for creating shortcuts (see Core Extension:Shortcut links), within MooseDocs these are deemed "shortcut links." The AutoLink extension allows for markdown filenames to be used within a shortcut link. In this case the text from the first heading is used as the link text, as in Example 3.

It is also possible to include html style bookmarks with the filename, depending on the configuration (see Table 1) the link text will include the name of the text within the bookmark and optionally the page heading, see Example 4.

Automatic Source Content

If a filename is used within a link or shortcut link and the file is contained in the git repository a bottom extending modal window will be created that displays the complete text, as shown in Example 5.