You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have put a favicon.ico in the src/assets folder but it is not picked up by Vitepress, in the sense that the resulting HTML has no <link rel="icon" href="/favicon.ico"> line.
If I look in the build log I see
Warning: DocumenterVitepress: No favicon.ico file found in `docs/src/assets`. Skipping favicon replacement.
However, if I look at the source of modify_config_file (which raises the warning), I see that it checks whether a favicon is present in the public subfolder. If no such file is present then the favicon setting is removed from the configuration file.
Looking at the render function I see some code that moves favicons and logos from the assets subfolder to the public subfolder, but that code is run AFTER the call to modify_config_file. If exchange the order of the two code blocks (see lcontento@e562718) then the resulting HTML contains the favicon link. This is still not enough to display the favicon though because of #141, but then it's just a matter of moving it manually to the root folder.
Since I am new to Vitepress I am not sure if my (partial) fix is the correct one or not, or even if I am right in putting the favicon.ico into the assets subfolder in the first place like it is done for vanilla Documenter, but if you think my approach is correct I can open a PR with it.
The text was updated successfully, but these errors were encountered:
I have put a
favicon.ico
in thesrc/assets
folder but it is not picked up by Vitepress, in the sense that the resulting HTML has no<link rel="icon" href="/favicon.ico">
line.If I look in the build log I see
However, if I look at the source of
modify_config_file
(which raises the warning), I see that it checks whether a favicon is present in thepublic
subfolder. If no such file is present then the favicon setting is removed from the configuration file.Looking at the
render
function I see some code that moves favicons and logos from theassets
subfolder to thepublic
subfolder, but that code is run AFTER the call tomodify_config_file
. If exchange the order of the two code blocks (see lcontento@e562718) then the resulting HTML contains the favicon link. This is still not enough to display the favicon though because of #141, but then it's just a matter of moving it manually to the root folder.Since I am new to Vitepress I am not sure if my (partial) fix is the correct one or not, or even if I am right in putting the
favicon.ico
into theassets
subfolder in the first place like it is done for vanilla Documenter, but if you think my approach is correct I can open a PR with it.The text was updated successfully, but these errors were encountered: