-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
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:
- Setting the
base
and updating the favicon path accordingly:head: [['link', { rel: 'icon', href: '/doc-blog/favicon.ico' }]]
- Trying this path instead:
head: [['link', { rel: 'icon', href: '/docs/favicon.ico' }]]
- 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
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Metadata
Metadata
Assignees
Labels
No labels