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.
Parameter | Type | Description |
---|---|---|
title | Title | document title |
logo | Picture | header logo |
favicon | Favicon | tab favicon |
editURL | string | github repo url |
url | string | deployment url for sitemap |
menu | Menu | menu config |
footer | Footer | footer config |
syntaxHighlighter | Partial<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 & {});
Menu
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 };
Footer
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.