Links
A Markdown link looks like this:
[Link text](destination.md)
It has two components:
- Link text enclosed in square brackets
[ ]
- Link destination enclosed in parentheses
( )
Link between documentation pages in the same repository using the file’s relative or absolute path. The path must include the .md
file extension. Optionally append an anchor to send readers to a specific section on a page. Never use a full URL for links between documentation pages.
Use relative paths to link to other pages inside the same repository.
[Security docs](../security/index.md)
[Install](monitor/index.md#installation)
Use absolute paths to link to other pages inside the same repository.
[API keys](/deploy-manage/api-keys.md)
[Authentication](/deploy-manage/api-keys.md#authentication)
Note the leading /
before the path.
Link to sections within the same document using heading anchors prefixed with #
:
[Jump to the next section](#next-section-anchor)
Headings will automatically create anchor links in the resulting HTML. They are automatically generated by:
- Converting to lowercase
- Replacing spaces with hyphens
- Removing special characters
For example:
### Same-page links (anchors)
<!-- Creates anchor #same-page-links-anchors -->
You can specify custom anchors for headings inline:
## License management [manage-license]
<!-- Creates anchor #manage-license instead of #license-management -->
Custom anchors are also cleaned up to remove special characters and spaces, and converted to lowercase:
## API Setup [First Time Setup!]
<!-- Creates anchor #first-time-setup -->
Link to documentation in different repositories using the scheme://path
syntax:
[Kibana API documentation](kibana://api/index.md)
[Beats configuration](beats://configuration.md)
The syntax follows the format <scheme>://<path>
, where:
scheme
: The target repository name (e.g., kibana, beats)path
: The file path within that repository
The path
in cross-repo links must be relative to the docset.yml
file and not the full path within the repo
Never use a full URL for links across documentation repositories.
Link to websites and resources outside the Elastic docs:
[Elastic Cloud](https://cloud.elastic.co)
[Elastic Documentation](https://www.elastic.co/guide)
You can include Markdown formatting within link text:
[**Distributed architecture**](distributed-architecture.md)
[*Production guidance* and best practices](production-guidance.md)
[`manage-connectors.md`](manage-connectors.md)
When linking to local Markdown files, you can omit the link text to automatically use the target page's title:
[](maintenance.md)
<!-- Uses the title from maintenance.md -->
[](monitoring.md#alerting)
<!-- Uses "Alerting" section title from monitoring.md -->
You can also auto-generate text for specific headings within files:
[](deploy.md#scaling)
<!-- Uses "Scaling" section title from deploy.md -->
[](#configuration)
<!-- Uses the "Configuration" section title from current file -->
docs-builder
supports reference-style external links.
- Link: This link uses the reference name as text.
- Your own text: This link overrides the reference name.
- [Link]: This link uses the reference name as text.
- [Your own text][Link]: This link overrides the reference name.
% References are typically added at the bottom of the page
[Link]: https://elastic.co/docs
Reference-style links are useful when adding links to tables, for example, or to update frequently used links more easily. Place them at the end of the document to simplify their management.
This syntax exists to aid with migration. It is scheduled for removal and should not be used in new content.
Some text $$$custom-anchor$$$ more text