Skip to content

[Feature]: Support custom URL for navbar logo #2963

@xalanq

Description

@xalanq

What problem does this feature solve?

Currently, the navbar logo is hardcoded to link to /. This makes it difficult to integrate Rspress docs into larger websites where the logo should link to the parent site (e.g., company homepage) rather than the docs homepage.

Current code:

href={addLeadingSlash((localeData as any).langRoutePrefix ?? '/')}

What does the proposed API look like?

Add an optional logoLink configuration following the existing logo pattern:

import { defineConfig } from '@rspress/core';

export default defineConfig({
  logo: '/logo.png',
  logoLink: 'https://example.com', // New field, defaults to '/' if not specified
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions