Skip to content

Top Navigation Configuration

Overview

The top navigation bar is configured in src/docs/config/navConfig.ts. This file exports an array of navigation items that are displayed as links in the header of every documentation page.

The navigation bar provides top-level links that persist across all pages, making it ideal for linking to major sections, external resources, or related sites.

Configuration File

The navigation configuration is located at:

src/docs/config/navConfig.ts

Basic Structure

The configuration exports an array of NavItem objects:

// src/docs/config/navConfig.ts
import type { NavItem } from "../types";

export const navConfig: NavItem[] = [
  {
    label: "Documentation",
    href: "/docs",
  },
  {
    label: "Blog",
    href: "/blog",
  },
  {
    label: "GitHub",
    href: "https://github.com/your-org/pathfinder",
    external: true,
  },
];

Each navigation item supports the following properties:

PropertyTypeRequiredDefaultDescription
labelstringYesThe text displayed in the navigation bar
hrefstringYesThe URL the link points to
externalbooleanNofalseWhether the link opens in a new tab
iconstringNoAn optional icon identifier displayed before the label
hideOnMobilebooleanNofalseWhether to hide this item on mobile viewports

When external is set to true, the link will:

  • Open in a new browser tab (target="_blank")
  • Include rel="noopener noreferrer" for security
  • Display an external link icon after the label
{
  label: "API Reference",
  href: "https://api.example.com/docs",
  external: true,
}

Icons

You can add an icon before the navigation label by specifying an icon identifier:

{
  label: "GitHub",
  href: "https://github.com/your-org/pathfinder",
  external: true,
  icon: "github",
}

The available icon identifiers depend on the icon set configured in your theme. By default, Pathfinder supports a set of common icons including github, discord, twitter, and external.

Mobile Behavior

On mobile viewports, the navigation bar collapses into a hamburger menu. All navigation items are displayed in the mobile menu by default. To hide specific items on mobile (for example, items that are redundant with sidebar navigation), use the hideOnMobile property:

{
  label: "Getting Started",
  href: "/docs/getting-started",
  hideOnMobile: true, // Hidden on mobile since it's in the sidebar
}

Complete Example

Here is a complete navigation configuration with various link types:

// src/docs/config/navConfig.ts
import type { NavItem } from "../types";

export const navConfig: NavItem[] = [
  {
    label: "Docs",
    href: "/docs",
  },
  {
    label: "Components",
    href: "/docs/components",
    hideOnMobile: true,
  },
  {
    label: "Blog",
    href: "/blog",
  },
  {
    label: "Changelog",
    href: "/changelog",
  },
  {
    label: "GitHub",
    href: "https://github.com/your-org/pathfinder",
    external: true,
    icon: "github",
  },
  {
    label: "Discord",
    href: "https://discord.gg/your-server",
    external: true,
    icon: "discord",
  },
];

Ordering

Navigation items are displayed in the order they appear in the array. Place the most important links first, as they will be most visible on all screen sizes.

Styling

The navigation bar uses the following default styles:

ElementStyle
BackgroundMatches the page background with a subtle border-bottom
Link textMedium weight, muted color that brightens on hover
Active linkPrimary color with underline indicator
External iconSmall arrow icon, slightly offset from the label
Mobile menuFull-width dropdown with larger touch targets

Best Practices

  • Keep it concise — The navigation bar has limited horizontal space. Aim for 4-6 items maximum.
  • Prioritize by importance — Place the most frequently accessed links first in the array.
  • Use clear labels — Navigation labels should be one or two words. Avoid long descriptive text.
  • Group external links — Place external links at the end of the navigation array so users know they will leave the site.
  • Test on mobile — Always verify that the navigation works well on mobile viewports. Use hideOnMobile to reduce clutter when needed.
퍼널해커

중소기업을 위한 AI 마케팅&세일즈 자동화 시스템을 설계하고 구축합니다. 웹사이트, SEO, 콘텐츠, 리드 수집까지 한번에.

상호명: 퍼널해커 대표자: ___ 사업자등록번호: ___-__-_____ 통신판매업 신고번호: 제____-서울___-____호 주소: ___ 이메일: ___@funnelhacker.co.kr 호스팅 서비스 제공자: Netlify, Inc.

Copyright 2026 퍼널해커. All Rights Reserved