The OrchidGroovydoc plugin integrates with the
tool to embed class and package info from Groovy and Java source code directly in your Orchid site. Comment text is
compiled as Markdown, and is also fully-searchable with the OrchidSearch plugin.
Once the Groovydoc plugin is added to your build, you need to tell Orchid where it can find your Groovy/Java code. This
is set in your
config.yml as a list of file paths to the root package for your code.
A typical use-case is to have Orchid be in a separate Gradle subproject than the code it's documenting. For example,
app subprojects with the following standard Gradle/Maven project structure:
. / (repo root)
| └── src/main/groovy/ <-- this is the directory you need to reference
| └── com/example/
| └── Main.groovy
└── src/orchid/resources/ <-- these are your Orchid resources
config.yml can specify a relative path from your Orchid resources to your Groovy code source root:
sourceDirs will include them all in the generated documentation, such as including both
java directories for a single module.
OrchidGroovydoc ships with several menu item types that are useful for creating docs with a similar feel to standard
Groovydoc sites. The
groovydocPackages simply link to all generated class and package pages,
like the sidebar frames on typical Groovydoc pages.
groovydocClassLinks creates links to each individual field, constructor, and method documented in a class page,
similar to the "summary" section of typical Groovydoc pages. It can only be added to Groovydoc class pages.
All three of these menu items are best added to the Groovydoc page Archetypes in
classPages: # <-- applied only to Groovydoc class pages
- type: "groovydocClassLinks"
pages: # <-- applied to Groovydoc class and package pages
- type: "groovydocClasses"
- type: "groovydocPackages"