Skip to content
duxt

Declaring the section

The `bruno` section type — where the collection lives, and what it becomes.

A collection is a generated section like any other: a source names an artefact and the type that reads it.

export default defineAppConfig({
  duxt: {
    sources: [
      {
        path: 'docs',
        generated: [
          {
            type: 'bruno',
            path: 'api',
            label: 'API'
          }
        ]
      }
    ]
  }
})

!IMPORTANTpath names a directory, not a file. bruno is the first type whose artefact is a tree — bruno.json, the .bru files, folder.bru ordering — so it declares input: 'directory' and reads its own input. Every other type stays on a single file and is unchanged.

What it builds

/api                              the overview, from `bruno.json`
/api/<folder>                     one page per folder, nested as on disk
/api/<folder>/<request>           one page per request

Folders nest as deeply as the collection does. seq in meta is what orders both folders and requests, exactly as it orders them in Bruno; a folder or request without one sorts by name, so a build is reproducible either way.

The two policies

PolicyValueWhy
versioningper-versionAn API belongs to the release it describes.
localisationper-localeA docs block is written prose, so a translation is real.

Both match openapi, and both types render in the same reference layout — one rendering path, two parsers.

Options

OptionWhat it does
tryIt.baseUrlThe public base URL that turns on the request client — absolute, or / for the site's own origin. Off by default.
tryIt.baseVariableWhich Bruno variable that base URL stands in for. Defaults to baseUrl.
tryIt.variablesVariables with a public value, and the only ones ever substituted.
fetchA public git URL, which turns on the Fetch in Bruno action.
Was this page helpful?