Configuration

Configure your Nexd app through nexd.config.ts at the root of your project.

The config is fully typed to help prevent mistakes as much as possible.

ParameterTypeDescription
titleTitledocument title
logoPictureheader logo
faviconFavicontab favicon
editURLstringgithub repo url
urlstringdeployment url for sitemap
menuMenumenu config
footerFooterfooter config
syntaxHighlighterPartial<SyntaxHighlighter>syntax highlighter themes - { dark?: BundledShikiTheme, light?: BundledShikiTheme }
tableOfContents{min?: HeadingDepth; max?: HeadingDepth }table of contents config - defaults to
{ min: 2, max: 3 }

Types

Title

export type Title = string | { base: string; prefix?: string; postfix?: string };

HeadingDepth

type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6;

Picture

export type Picture = { alt: string; src: string } | { alt: string; dark: string; light: string };

Favicon

export type Favicon =
| { src: string; type?: FaviconType }
| { dark: string; light: string; type?: FaviconType };
// * FaviconType can be 'image/x-icon', 'image/svg+xml', or any other string.
// * The default value is 'image/svg+xml'.
export type FaviconType = 'image/x-icon' | 'image/svg+xml' | (string & {});
export type Menu = MenuItem[];
export type MenuItem = MenuLink | MenuDropdown;
export type MenuLink = { href: string; title: string; items?: never };
export type MenuDropdown = { title: string; items: MenuLink[]; href?: never };
export type Footer = FooterColumn[];
export type FooterColumn = { title: string; items: FooterItem[] };
export type FooterItem =
| { href: string; title: string }
| { href: string; social: SocialMedia; iconOnly?: boolean };
export type SocialMedia = 'x' | 'npm' | 'github' | 'reddit' | 'discord' | 'linkedin' | 'instagram';

Layout

The sidebar, pagination, breadcrumbs and table-of-contents are automatically generated based on the folder structure and frontmatter settings.