Structure of a Doctave Project
A Doctave project is primarily made up of files on your source control. Lets take a look at the details.
├── doctave.yaml
├── opeanapi.yaml
├── README.md
├── getting-started.md
├── _assets
└── ...
├── components
└── ...
├── guides
└── ...
├── tutorials
└── ...
└── reference
└── ...
The doctave.yaml
file
Doctave assumes the root of your project to be the directory including the main
project configuration file: doctave.yaml
. This file is referred to as the project file.
This file describes a number of things about your project, from theming, to which OpenAPI specifications to include.
You can read the reference for the project file here.
Navigation structure with navigation.yaml
The main site navigation is defined in the navigation.yaml
file. You can
use it to define nested sections of links to your docs.
You can multiple navigation.yaml
files in your project for different tabs.
You can read the reference for the navigation file here.
Markdown content
Doctave will interpret all Markdown files in your project as individual pages. The location of the files in your project will determine which URL the page will be accessible at.
The root URL (/
) will always resolve to README.md
. The URL path
/guides/creating-an-account
will resolve to the file
guides/creating-an-account.md
, or guides/creating-an-account/README.md
, if
the former doesn't exist.
Assets
All your assets, such as images, should be put in a _assets
directory. You
can reference these assets in your docs by using their path from the root
of the project:
![a picture of a cat](/_assets/cat.jpg)
All asset paths must be absolute and start with a forward slash (/
)
OpenAPI specifications
Including your OpenAPI specification in your docs will let Doctave create API reference documentation from it.
You can read more about including OpenAPI specs here.