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'
}
]
}
]
}
})
!IMPORTANT
pathnames a directory, not a file.brunois the first type whose artefact is a tree —bruno.json, the.brufiles,folder.bruordering — so it declaresinput: '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
| Policy | Value | Why |
|---|---|---|
versioning | per-version | An API belongs to the release it describes. |
localisation | per-locale | A 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
| Option | What it does |
|---|---|
tryIt.baseUrl | The public base URL that turns on the request client — absolute, or / for the site's own origin. Off by default. |
tryIt.baseVariable | Which Bruno variable that base URL stands in for. Defaults to baseUrl. |
tryIt.variables | Variables with a public value, and the only ones ever substituted. |
fetch | A public git URL, which turns on the Fetch in Bruno action. |