# Configuration
> Every option on ShellDocsOptions. Site details, layout, navigation, packages, versions, redirects, branding, colour preset and component registration.
Source: https://shelldocs.shellui.dev/docs/getting-started/configuration
A ShellDocs site is configured in one place: the `AddShellDocs` call in `Program.cs`.
## The minimum
```csharp
builder.Services.AddShellDocs(o =>
{
o.ContentRoot = Path.Combine(builder.Environment.ContentRootPath, "content");
o.SiteName = "MyDocs";
o.GitHubRepo = "my-org/my-docs";
});
```
That is a working site. The built-in content primitives are registered for you.
## Site details
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `SiteName` (required) | `string` | `empty` | Brand name shown in the header and sidebar. |
| `SiteTagline` | `string?` | `â` | One-line description shown in the footer. |
| `GitHubRepo` | `string?` | `â` | Owner and repository, for example my-org/my-docs. Used for the GitHub link and as the default issue tracker. |
| `SiteUrl` | `string?` | `â` | Absolute address of the deployed site. Used in the links the preview menu builds and in the llms.txt files. |
| `IssueTrackerUrl` | `string?` | `GitHubRepo issues` | Where the preview menu's Report a bug and Suggest something open a new issue. With neither this nor GitHubRepo set, those items are hidden. |
| `ContentRoot` | `string` | `content` | Path to the content folder. |
The sitemap and social meta tags of a static export come from the `--site-url` flag of [shelldocs build](https://shelldocs.shellui.dev/docs/cli/build.md).
## Layout and page header
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `LayoutVariant` | `DocsLayoutVariant` | `TopNav` | TopNav is a header across the top with the sidebar below. Sidebar has no top header; brand and search live in a floating sidebar. This site uses Sidebar. |
| `RenderPageTitle` | `bool` | `false` | Renders the frontmatter title as the page heading, and the description as a lead paragraph, on pages whose body does not start with its own heading. |
```csharp
o.LayoutVariant = DocsLayoutVariant.Sidebar;
o.RenderPageTitle = true;
```
## Header navigation
| Call | Adds |
|---|---|
| `AddNavLink(label, href)` | A link in the primary nav |
| `AddNavMenu(label, itemsâ¦)` | A dropdown of links, each with an optional description and icon |
```csharp
o.AddNavLink("Docs", "/docs/introduction");
o.AddNavLink("Releases", "https://github.com/my-org/my-lib/releases");
o.AddNavMenu("Learn",
new NavMenuItem("Getting started", "/docs/getting-started/installation", "Install and scaffold your first site."),
new NavMenuItem("Authoring", "/docs/authoring", "Write pages in markdown."));
```
On small screens the primary nav becomes a menu behind the hamburger button.
## Package selector
For a product made of several packages, the sidebar can show a selector that jumps between each package's docs.
```csharp
o.AddPackage("mylib.core", "MyLib.Core", "The core library.", "/docs/core");
o.AddPackage("mylib.cli", "MyLib.CLI", "The command line.", "/docs/cli");
```
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `id` (required) | `string` | | Unique identifier. |
| `title` (required) | `string` | | Name shown in the selector. |
| `description` (required) | `string` | | Second line in the menu. |
| `rootUrl` (required) | `string` | | Where selecting the package goes. May contain the version token. |
| `iconPath` | `string?` | | The d attribute of an SVG path on a 24 by 24 view box. Not a URL. |
The selector is hidden with fewer than two packages. The selected package is the one whose root URL is the longest prefix of the current path.
## Versions
```csharp
o.AddVersion("v2.0", "v2.0.0", "/docs/v2.0", "Current stable", latest: true);
o.AddVersion("v1.9.1", "v1.9.1", "/docs/v1.9.1", "Previous release");
```
Registering versions adds a version selector and scopes the sidebar, search, breadcrumb and prev/next links to the version being read. The full walk-through is in [Versioning](https://shelldocs.shellui.dev/docs/guides/versioning.md).
## Redirects
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `EnableRedirects` | `bool` | `true` | Redirects folder URLs, version roots and unversioned URLs to the right page. |
| `AddRedirect(from, to, permanent)` | `method` | | A rule for moved content. Matches by path segment and covers everything under the source path. Permanent by default. |
```csharp
o.AddRedirect("/docs/setup", "/docs/getting-started/installation");
```
See [Redirects](https://shelldocs.shellui.dev/docs/guides/redirects.md).
## Brand logo
| Name | Type | Default | Description |
|------|------|---------|-------------|
| `LogoSvg` | `string?` | `â` | Inline SVG markup. Use currentColor and one logo serves both themes. Rendered as raw markup, so only pass content you wrote. |
| `LogoLight / LogoDark` | `string?` | `â` | Image URLs for each theme, for logos with fixed colours. |
| `LogoAlt` | `string?` | `SiteName` | Accessible label for the logo. |
| `LogoHeight` | `double` | `1.375` | Height in rem. |
| `SetLogo(url, alt)` | `method` | | One image for both themes. |
| `SetLogo(light, dark, alt)` | `method` | | An image per theme. |
```csharp
o.LogoSvg = File.ReadAllText(Path.Combine(builder.Environment.WebRootPath, "brand/logo.svg"));
```
## Registering components
Built-in primitives are always available. Register your own so their tags work in markdown and previews.
| Call | Registers |
|---|---|
| `RegisterComponent