---
url: /reference/@cssdoc/markdown/functions/buildSidebar.md
---
# Function: buildSidebar()

```ts
function buildSidebar(
   entries, 
   baseHref?, 
   groups?
): SidebarItem[];
```

Defined in: [emitters/markdown/src/build.ts:71](https://github.com/thedannywahl/cssdoc/blob/main/emitters/markdown/src/build.ts#L71)

Build the sidebar tree (Overview, then a group per `@group` or kind). Grouping and order follow
[groupEntries](groupEntries.md); pass `groups` for an explicit label order.

## Parameters

### entries

readonly [`CssDocEntry`](../../core/interfaces/CssDocEntry.md)\[]

### baseHref?

`string` = `"/"`

### groups?

readonly `string`\[]

## Returns

[`SidebarItem`](../interfaces/SidebarItem.md)\[]
