Skip to content

Commit

Permalink
Theme: Add support for SVG favicon
Browse files Browse the repository at this point in the history
Often much smaller than the ICO or PNG variant, even if the ICO
is only at low-res (no HiDPI), the SVG icons I checked for several
OpenJS Foundation projects were all smaller than their 32px ICO
counterparts.
  • Loading branch information
Krinkle committed Dec 11, 2020
1 parent e3c391f commit 4d74570
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ amethyst:
# Base URI for "Edit this page" links.
# When set, this is combined with the relative path to the Markdown file in the repo.
edituri_base: https://github.com/qunitjs/jekyll-theme-amethyst/blob/main/
# Defaults to "/favicon.svg"
favicon:
header_logo:
src:
width:
Expand Down
2 changes: 1 addition & 1 deletion _layouts/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title | escape }} | {% endif %}{{ site.title | escape }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="/favicon.ico">
<link rel="icon" href="{{ site.amethyst.favicon | default: '/favicon.svg' }}">
<link rel="stylesheet" href="/assets/styles.css" media="screen">
{% include opengraph.html -%}
<body>
Expand Down
3 changes: 3 additions & 0 deletions favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4d74570

Please sign in to comment.