Configuration

Doxyte expects the config file to be in TOML format and to have the following fields:

Required fields

The following fields must be present in the config file:

Key Description
rootdir Path to the directory containing the markdown sources
pages List of markdown source files (see Pages below)

Root directory

This is the path to the directory containing the site content (markdown sources, images, etc.). For example:

rootdir = "src"

Pages

Each page is represented as a hash with keys path, title, and optionally icon (see Navbar icons below). For example:

pages = [
  { path = "index.md", title = "The Project" },
  { path = "usage/config.md", title = "Configuration" },
]

Optional fields

These fields are optional, as far as Doxyte is concerned. But site-prefix may be required for your links to work.

Key Description
site-prefix Path to prepend to internal URLs that start with /
favicon Path to an SVG image to use as site icon
footer Text to include in the footer of every page
custom-css Path to a CSS file to add to the site
highlight-style Style to use for highlighting code blocks

Site prefix

If your site is not hosted at the root of the domain, e.g. if the URL is www.example.com/project/ rather than project.example.com/, you have to set the site-prefix field to the path between the domain and the top-level index.html. For example:

site-prefix = "project"

This will change the link to the CSS file in the HTML output from /main.css to /project/main.css etc.

It does not affect any links in the page body content. So please use relative paths for internal links in your markdown sources.

Favicon

You can supply an image file to use as the site favicon (the icon next to the title in the browser tab). For example:

favicon = "static/logo.svg"

For top-level pages, you can display an icon instead of the title in the navigation bar1, by setting the icon field in the relevant item in the pages list. For example:

pages = [
  { path = "index.md", title = "The Project", icon = "static/logo.svg" },
  ...
]

The footer field is the place to define any text you want included in the footer of every page, e.g. copyright information, project links, etc. For example:

footer = "[Subscribe](https://example.com/rss/) for updates!"

Custom CSS

You can provide extra CSS rules to customise the styling of the site by specifying a path to a CSS file in the custom-css field. For example:

custom-css = "static/custom.css"

Code highlighting style

If you want syntax highlighting for your code blocks, set the highlight-style field to one of the Chroma styles. For example:

highlight-style = "tango"

If you leave it out, your code blocks will remain untouched.


  1. Subchapters aren’t shown in the navbar, so setting an icon for them won’t have any effect. ↩︎