Skip to content

The favicon is not working. #4684

@DominoKorean

Description

@DominoKorean

Describe the bug

I followed the instructions in the official VitePress documentation to add a favicon, but it doesn't seem to be working.

Reproduction

  • I added this to my config.mjs:
    head: [['link', { rel: 'icon', href: '/favicon.ico' }]]
  • I placed the favicon.ico file inside the /docs/public directory.

Despite this, the favicon does not show up in the browser.

To troubleshoot the issue, I also tried the following:

  1. Setting the base and updating the favicon path accordingly:
    head: [['link', { rel: 'icon', href: '/doc-blog/favicon.ico' }]]
  2. Trying this path instead:
    head: [['link', { rel: 'icon', href: '/docs/favicon.ico' }]]
  3. Hard reloading the browser with Ctrl + F5.

Currently, the site is deployed via GitHub Pages, using a repository named doc-blog without a custom domain.
Here is the repository: https://github.com/DominoKorean/doc-blog

Expected behavior

The favicon should appear in the browser tab when visiting the site.

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (6) x64 Intel(R) Core(TM) i5-9400F CPU @ 2.90GHz
    Memory: 6.58 GB / 15.94 GB
  Binaries:
    Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 121.0.6167.161
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    vitepress: ^1.6.3 => 1.6.3

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions