-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change favicon in docker? #3929
Comments
I had a question similar to yours I use docker to deploy the website just like you. Adding some custom content should not be done in dockerfile or docker-compose.yaml, it needs to be placed in a custom theme folder. Anyway, I implemented it |
@liuhuanshuo The only way that I have been able to change the favicon is by specifying a favicon that is hosted on a different site. I did this by adding the following line of code within the
Definitely not an ideal solution but it works. |
You are right, replacing files is not the best solution I searched for more related questions and finally I found the answer https://www.reddit.com/r/BookStack/comments/xqp41o/changing_favicon/ As mentioned in the above link, we only need to add a line of code in the settings of the web version, and it works for me. <link rel="icon" href="https://example.com/url-to-icon.png" /> |
I actually tried that before posting this issue. It did not work for me when I first tried it. Since you confirmed it worked for you, I removed my override base.blade.php and tried adding that line of code in the admin settings and it worked this time! I'm guessing my browser cache did not fully clear the last time I tried it. Still, I wish there was a simple way to use an internal image file instead of pulling the icon from an external site. |
So here is how I am currently using an internal image:
Anyone, please feel free to comment if there is a better way. |
@jeffshead Glad to see you found a solution. I've just merged in #3994, to be part of the next release, so that png-based favicon can be set directly from the settings in the same way as the app logo. |
Attempted Debugging
Searched GitHub Issues
Describe the Scenario
Use custom favicon. Isn't there a way to do this by adding a volume entry in the Portainer stack?
I have tried numerous lines but none work. For example:
If I use the following, the favicon appears to have been replaced but I only get a "File not found" error on the page and I cannot access the site:
Exact BookStack Version
v22.11.1
Log Content
No response
PHP Version
Whatever comes with the Docker image
Hosting Environment
AlmaLinux 8.7 host, Portainer, Nginx Proxy Manager
The text was updated successfully, but these errors were encountered: