Skip to content

Commit eb46eaa

Browse files
mle-ensowilkinsona
authored andcommitted
Improve documention on how to use .adoc snippets
Closes gh-279
1 parent f77864b commit eb46eaa

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/src/docs/asciidoc/getting-started.adoc

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,26 @@ that can be produced by Spring REST Docs.
419419
[[getting-started-using-the-snippets]]
420420
=== Using the snippets
421421

422-
The generated snippets can be included in your documentation using the
422+
Before using the generated snippets from above, an ```\*.adoc``` source file must be manually created.
423+
Its filename does not matter for either of the two build tools' Asciidoctor plugins mentioned
424+
above and will also be the name of the finally generated ```*.html``` file.
425+
For the exact locations refer to the following table.
426+
427+
[cols="2,5,8"]
428+
|===
429+
| Build tool | Source files | Generated files
430+
431+
| Maven
432+
| ```src/main/asciidoc/*.adoc```
433+
| ```${project.build.directory}/generated-docs/*.html```
434+
435+
| Gradle
436+
| ```src/docs/asciidoc/*.adoc```
437+
| ```$buildDir/asciidoc/*.html```
438+
439+
|===
440+
441+
The generated snippets can then be included in the manually created Asciidoctor file from above using the
423442
http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files[include macro].
424443
The `snippets` attribute specified in the <<getting-started-build-configuration, build
425444
configuration>> can be used to reference the snippets output directory. For example:

0 commit comments

Comments
 (0)