You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
502 B
24 lines
502 B
////
|
|
=== Include files relative to a common source directory
|
|
|
|
This content is included in the user manual
|
|
////
|
|
|
|
Asciidoctor expands attributes in the target of the include directive.
|
|
That means you only have to type the unique part of the path when linking to a source file.
|
|
|
|
Example:
|
|
|
|
[source]
|
|
....
|
|
:sourcedir: src/main/java
|
|
|
|
[source,java]
|
|
----
|
|
\include::{sourcedir}/org/asciidoctor/Asciidoctor.java[]
|
|
----
|
|
....
|
|
|
|
The target of the include resolves to:
|
|
|
|
src/main/java/org/asciidoctor/Asciidoctor.java
|
|
|