Skip to content

favicon prefixes href with leading slash (/) when url is absolute #2647

Open
@techfg

Description

@techfg

What version of starlight are you using?

0.29.2

What version of astro are you using?

4.16.10

What package manager are you using?

npm

What operating system are you using?

linux

What browser are you using?

chrome

Describe the Bug

When favicon configuration parameter contains an absolute url, the generated link in head contains a leading slash.

integrations: [
    starlight({
	favicon: 'https://starlight.astro.build/favicon.svg',

image

Absolute URLs are valid for favicon so I believe one of the following should be applied:

  1. If Starlight requires a local resource, configuration validation should fail if url is not relative
  2. Starlight should allow absolute urls and not prefix with leading slash

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-starlight-15r2cj

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions