relative-link.adoc 597 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
= Link to Relative Files

If you want to link to an external file relative to the current document, use the `link` macro in front of the file name.

[source]
----
include::example$url.adoc[tag=link]
----

If your file is an HTML file, you can link directly to a section in the document, append a hash (`#`) followed by the section's ID to the end of the file name.

[source]
----
include::example$url.adoc[tag=hash]
----

////
You can also create links that refer to sections within the current document.

[source]
----
link:user-manual.html[URLs]
----

====
link:user-manual.html[URLs]
====
////