Project Configuration Reference

This document explains the available configuration options in the doctave.yaml file.

Configuration Example

An example doctave.yaml demonstrating the available configuration options.

---
title: Doctave Docs
logo:
  src: _assets/doctave-logo.svg
  src_dark: _assets/doctave-logo-dark.svg
colors:
  main: "#7B8FFE"
color_mode: auto
favicon:
  src: _assets/favicon.ico
open_api:
  - spec_file: http-spec.json
    uri_prefix: /api
user_preferences:
  tier:
    label: Tier
    default: Starter
    values:
      - Starter
      - Growth
      - Enterprise
header:
  cta:
    external: https://dashboard.doctave.com/users/register
    label: Sign Up
  links:
    - external: https://doctave.com
      label: What's Doctave?
styles:
  - _assets/style.css
redirects:
  - from: /docs/old/path
    to: /docs/new/path

Reference

Below are explanations of all the objects and their fields in the project configuration. Your doctave.yaml should contain a list of these objects.

Title

The title property is a string which defines the project title.

Logo

The logo property is a map that specifies the logo for the project.

fielddescriptionrequired?default
srcPath to image within _assets directorytrue
src_darkPath to image to use in dark modefalse

Favicon

The favicon property is a map that specifies the favicon for the project.

fielddescriptionrequired?default
srcPath to image within _assets directorytrue

OpenApi

The open_api property is a list of Source definitions.

Source

fielddescriptionrequired?default
spec_filePath to OpenAPI specification filetrue
uri_prefixPath to the generated OpenAPI pages in your docsfalse

Colors

The colors object can be used to update the color scheme of your documentation.

Variables

The following color variables are available:

fielddescriptionrequireddefault
mainMain brand colorfalse#7B8FFE
main-contrastContrast color for the main brand colorfalse#FFFFFF
text-baseMain text colorfalse#475569
text-strongColor of emphasized textfalse#1E293B
text-softColor of de-emphasized textfalse#94A3B8
bgBackground color for the pagefalse#FFFFFF
bg-secondarySecondary background (for example code blocks)false#F8FAFC
borderColor used for various bordersfalse#E2E8F0

You can use the -dark prefix to specify their dark mode versions:

fielddescriptionrequireddefault
main-darkMain brand colorfalse#7B8FFE
main-contrast-darkContrast color for the main brand colorfalse#FFFFFF
text-base-darkMain text colorfalse#cbd5e1
text-strong-darkColor of emphasized textfalse#f8fafc
text-soft-darkColor of de-emphasized textfalse#64748b
bg-darkBackground color for the pagefalse#0F172A
bg-secondary-darkSecondary background (for example code blocks)false#1E293B
border-darkColor used for various bordersfalse#334155

Section specifier

The above colors can be given a header-, nav-, or content- prefix to scope them to only a specific part of the page.

Color Mode

The color_mode property is used to control which color schemes are available for your site. By default it's set to auto.

When color mode is

  • light: your site will use the light theme and it can't be toggled

  • dark: your site will use the dark theme and it can't be toggled

  • auto: your site will use system theme and it can be toggled

User Preferences

The user_preferences property is a map of preference definitions.

Preference

fielddescriptionrequired?default
labelLabel for selectortrue
defaultDefault valuetrue
valuesPossible values as strings or User Preference Option objectstrue

User Preference Option

fielddescriptionrequired?default
labelLabel for User Preference Optiontrue
valueKey for User Preference Optiontrue

Styles

The styles property is a list of paths to stylesheets in the _assets directory.

Header

Header contains settings for your header bar at the top of your site.

fielddescriptionrequired?default
linksAn array of external links that will be placed on the header at the top of your site.false
ctaCall-to-action button that will be placed on the header at the top of your site.false

Header Link

fielddescriptionrequired?default
labelLabel that will be displayed in your header link.true
externalAn external url where the user will navigate upon clicking the linktrue

Header Call-To-Action

fielddescriptionrequired?default
labelLabel that will be displayed in your call-to-action button.true
externalAn external url where the user will navigate upon clicking the buttontrue

Redirects

The redirects property is a list of Redirect objects.

Redirect

The redirect object contains the source and destination urls of a single redirect.

fielddescriptionrequired?default
fromA url path from where the redirect will be activated.true
toA url path to where the redirect will lead to.true

Was this page helpful?