event-catalog / eventcatalog

An open source documentation tool to bring discoverability to your event-driven architectures
https://eventcatalog.dev
MIT License
1.75k stars 150 forks source link

fix(core): fixed favicon url #611

Closed Laupetin closed 3 months ago

Laupetin commented 3 months ago

Motivation

When using the default base url configuration it defaults to /. The favicon url is currently evaluated from

href={`${import.meta.env.BASE_URL}/favicon.ico`}

which results in a url of //favicon.ico.

<link rel="icon" type="image/svg+xml" href="//favicon.ico">

The browser interprets that as a host and tries to load a favicon from https://favicon.ico/ (if the catalog url uses https as protocol).

This PR makes the favicon url use the utils method that other places use as well to calculate its url.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 87e4ea085871e2a9fcd3c3b9857d2f6028f56b0d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------ | ----- | | @eventcatalog/core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

boyney123 commented 3 months ago

Nice find, thank you @Laupetin 🙏

boyney123 commented 3 months ago

@all-contributors add @Laupetin for code

allcontributors[bot] commented 3 months ago

@boyney123

@Laupetin already contributed before to code