There are several pieces that go into the docs.
Note: Paths are all relative to the root of the project.
-
Content files (markdown) files in
docs-src/main/
. These contain the content and links to code snippets defined in java src files. -
src files (java) that hold the compiled code (can be anywhere in the project, but are generally in
docs-src/src/
) -
the output of running snippets in the src files. E.G. the output of running
table.first(10)
-
The built docs that have not necessarily released are in
docs-src/dist/
-
The released/deployed docs are in
docs/
at the root of the project. (Github automatically serves whatever is in thedocs/
directory in the master branch)
-
Navigate to the
./docs-src
sub directory (Where POM is located). -
Run
mvn compile && mvn exec:java
- This will run the src files and save the output snippets to
docs-src/output/
- Run
mvn com.github.ryancerf:choss-maven-plugin:build-docs
This will inject snippets into content files and copy everything the content to docs-src/dist/
- To deploy the docs run the shell script
./deploy_docs.sh
.
- This will copy the
docs-src/dist/
directory todocs/
- Having a staging location for the built docs allows us to choose when to release them. We can now work on the docs for a new feature and then release them at the same time the feature is released.
For more background on injecting snippets see ryancerf/choss-maven-plugin
.