W
Wasp6d ago
AC

Changing favicon for OpenSaaS blog

How do I change the favicon for the Astro blog in the OpenSaaS template?
5 Replies
kapa.ai
kapa.ai6d ago
Hi @AC. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- To change the favicon for the Astro blog in the OpenSaaS template, you need to add your favicon file to the public directory. Based on the knowledge sources, here's how to do it: 1. Place your favicon file (typically named favicon.ico) in the public directory at the root of your project. 2. The assets in this directory will be served at the root path / during development and copied to the root of the dist directory as-is. According to a Discord conversation about this exact issue, one user successfully changed their favicon by placing it in the app/public folder:
public
├── banner.png
├── favicon.ico
└── public-banner.png
public
├── banner.png
├── favicon.ico
└── public-banner.png
If you don't see the changes immediately, you might need to refresh your browser tab with CTRL + SHIFT + R or CMD + SHIFT + R to clear the cache Discord support thread: opensaas favicon. The public directory is specifically designed for assets that: - Are never referenced in source code (like favicon.ico) - Must retain the exact same file name (without hashing) - Or you simply don't want to have to import first to get the URL When referencing these assets in your code, always use the root absolute path (e.g., /favicon.ico) Docs > Project > Static Assets. I hope this helps you change the favicon for your OpenSaaS blog! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @AC, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
AC
ACOP6d ago
Unfortunately that didn't work, any other ideas? I added to the following file: astro.config.mjs: javascriptstarlight({ // Try adding this to your starlight config: favicon: '/favicon.ico', // ...rest of your config })
miho
miho6d ago
I'd say this is out of scope for Wasp Discord help, it's better to go through Astro docs 🙂 maybe @Vinny (@Wasp) knows something
Vinny (@Wasp)
Vinny (@Wasp)6d ago
https://starlight.astro.build/reference/configuration/#favicon the Astro docs say the same thing. Did you put it in your public folder within the blog dir?
AC
ACOP6d ago
Thanks both! Yes, I tried putting it in the public folder but the code change I mentioned last night fixed the issue...it was right before I went to bed knowing Wasp's team is mostly in Europe...I should have been more explicit that the issue is resolved.

Did you find this page helpful?