Links

Create hyperlinks, cross-references, and external links in your documentation.

Links connect your documentation pages together and point to external resources. Mordoc supports standard markdown link syntax with automatic handling of external links.

Syntax

Create links using markdown bracket notation:

Markdown
[Link Text](URL)

Example

SyntaxResult
Markdown
[Mordoc docs](https://mordoc.dev)
Mordoc docs

Link types

Link to websites outside your documentation:

SyntaxResult
Markdown
[Node.js Official Site](https://nodejs.org)
[GitHub](https://github.com)

Node.js Official Site

GitHub

Link to other pages within your documentation using paths:

SyntaxResult
Markdown
[Create your first project](/get-started/creating-project)
[Install Git](/prerequisites/git)

Create your first project

Install Git

Create mailto links:

SyntaxResult
Markdown
[Contact Support](mailto:support@example.com)
Contact Support

Styling links

Mordoc provides sensible default styles for links. If you want to customize link colors to better match your brand, you can do so by adding a typography.json file under the config/styles/ directory.

This file allows you to control how links appear in both light and dark modes.

Available style variables

VariableDescriptionExample HEX value
linkColorLink color in light mode#171717
linkColorDarkLink color in dark mode#fafafa
linkHoverColorLink color on hover in light mode#000000
linkHoverColorDarkLink color on hover in dark mode#FFFFFF

Example configurations

Blue links:

Json
{
  "linkColor": "#0665c4",
  "linkColorDark": "#61b1f2",
  "linkHoverColor": "#0a0b66",
  "linkHoverColorDark": "#93c5fd"
}

Green links:

Json
{
  "linkColor": "#059669",
  "linkColorDark": "#10b981",
  "linkHoverColor": "#047857",
  "linkHoverColorDark": "#34d399"
}

Next steps

  • Images - Embed images in your documentation
  • Lists - Create ordered and unordered lists
  • Code Blocks - Add syntax-highlighted code examples