favicons fallback on raster.png due to smart quote in inst/BS5/templates/head.html

Open Beginner friendly
#3,005 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
92/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
html
Domain
documentation

Research direction

Start with inst/BS5/templates/head.html at the favicon link around line 9. Check the SVG link's type attribute and correct the quotation marks; done means the generated link is valid so browsers can use favicon.svg instead of falling back to the raster icon.

Written by the indexing model from the issue text.

Description

Note: This was found with assistance from Claude.

The SVG favicon <link> in inst/BS5/templates/head.html wraps the type value in curly/smart quotes (”…”, U+201D) instead of straight quotes:

See

https://github.com/r-lib/pkgdown/blob/a6abe43ed48e58b1de42eba5e5541a5b6c46b46f/inst/BS5/templates/head.html#L9

Because type="image/svg+xml" is malformed, browsers can't parse the link and ignore favicon.svg, falling back to the raster .ico/PNG. Sites whose raster favicon is lower quality then get a pixelated tab icon even though a crisp favicon.svg exists and is being copied to the site root.

Fix by replacing smart quote with straight quote

Potentially introduced in #2804 (smart-quote autocorrect when pasting the favicon snippet).

Dominant language
R
Stars
775
Forks
355
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pkgdown

All issues in r-lib/pkgdown

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.