Orchid
A beautiful and truly unique documentation engine and static site generator.
Orchid is a general-purpose static site generator with a focus on extensibility, and aimed at developers looking to improve their technical documentation. Orchid was born out of a desire for better-looking Javadocs and frustration with how difficult is it to manage large Jekyll sites and keep it up-to-date with your code.
Orchid supports a variety of plugins, including a wiki, static pages, blogs, and much more. It aims to have high compatibility with many of the existing static site generators, such as Jekyll, Gitbook, and Hugo, so that migration to Orchid is painless. And if you can't find a plugin to do what you need, Orchid provides an intuitive way to add your own private plugins and a rich API so you can make your site as beautiful and unique as an Orchid.
View the full documentation or see the quick-start below.
Table of Contents
Installation
Orchid integrates with any new or existing Gradle project. To get started, pick a Bundle (OrchidAll, OrchidBlog, or
OrchidProduct) or manually choose your desired Orchid plugins. You may pick a bundle to start with and add any number of
plugins afterward, both official and unofficial. Then, setup your project's build.gradle
file like so:
plugins {
// Add the official Orchid Gradle plugin so you can use Orchid with the custom DSL
id "com.eden.orchidPlugin" version "{version}"
}
repositories {
// Orchid uses dependencies from both Jcenter and Jitpack, so both must be included. jcenter also includes
// everything available from MavenCentral, while Jitpack makes accessible any Github project.
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
// Add an Orchid Bundle. OrchidAll comes with all official themes included.
// You must include a theme separately when using the OrchidBlog and OrchidProduct bundles
orchidDocsRuntime 'io.github.javaeden.orchid:OrchidAll:{version}'
}
orchid {
// Version, theme, and baseUrl are required
version = "${project.version}"
theme = "{theme class}"
// Add this is you are developing a theme or plugin to include its own `main module` sources in the Orchid build
includeMainConfiguration = true
// The following properties are optional
baseUrl = "{baseUrl}" // a baseUrl appended to all generated links. Defaults to '/'
srcDir = "path/to/new/source/directory" // defaults to 'src/orchidDocs/resources'
destDir = "path/to/new/destination/directory" // defaults to 'build/docs/javadoc'
runTask = "build" // specify a task to run with 'gradle orchidRun'
}
You can now run Orchid in the following ways:
./gradlew orchidRun
- Runs an Orchid task. TherunTask
should be specified inbuild.gradle
or passed as a Gradle project property (-PrunTask=build
). The tasklistTasks
will show a list of all tasks that can be run given the plugins currently installed. Similarly,listOptions
will list all options that can be set through Gradle../gradlew orchidBuild
- Runs the Orchid build task a single time then exits. The resulting Orchid site will be inbuild/docs/javadoc
unless the output directory has been changed../gradlew orchidServe
- Sets up a development server and watches files for changes. Must have theOrchidServer
plugin installed for this task to work, which is included in all the above bundles.- If you are developing a Java application, Orchid replaces the standard Javadoc task with its own
build
task. In addition to running the standard Orchid build, when Orchid is run from Javadoc it will be able to create pages for all your project's classes and packages, just like you'd expect from a normal Javadoc site, but embedded within your chosen Orchid theme. You must have theOrchidJavadoc
plugin installed for this to work properly.
On windows, all the above commands need to be run with gradlew
instead of ./gradlew
.
The Orchid Gradle plugin adds a new configuration and content root to your project, in the src/orchidDocs
directory
(you may have to create this folder yourself). All your site content sits in src/orchidDocs/resources
, and any
additional classes you'd like to include as a private plugin can be placed in src/orchidDocs/java
.
Configuration
You should create a config.yml
file in your resources directory to customize your theme or configure your build. These
values can then be used in all templates and when preprocessing your content files under the options
variable.
Alternatively, you may create a file in data/
with your data which will be accessible at options.[filename]
.
Development Progress
Orchid is still in the early stages of development. While much of the public API is solid and not likely to change, I make no guarantees that any particular API will not change or be removed. In addition, themes are likely to change significantly, so any custom templates may not behave as expected after an Orchid update.
The following table lists all Orchid packages currently in development:
Core Packages
Name | Version |
---|---|
Orchid Core | |
Orchid Gradle Plugin | |
Themes
Name | Version |
---|---|
OrchidBsDoc | |
OrchidEditorial | |
OrchidMaterialize | |
Plugins
Name | Version |
---|---|
Changelog | |
Javadoc | |
LanguagePack | |
Pages | |
Posts | |
Server | |
Wiki | |
License
Orchid is open-source software licensed under the GNU Lesser General Public License (LGPL). See License.md for more information.
Contributing
This repository is comprised of many individual projects, which are all listed above. You can build and run any project
with Gradle from the project root, such as gradle :OrchidCore:assemble
or gradle :plugins:OrchidServer:assemble
, or
you may navigate to a particular project's subdirectory to run the Gradle commands directly. When contributing code,
please indent using 4 spaces and keep braces on the same lines.
Contact
Orchid is being actively developed by Casey Brooks. Please open an issue here with questions or bug/feature requests, or you can reach me directly at [email protected].