Skip to content

Commit a38c778

Browse files
author
Chris Berthe
authored
Add favicon to theme settings (#86)
1 parent cf7156f commit a38c778

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed

config/settings_schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,5 +250,16 @@
250250
"info": "t:settings_schema.social-media.settings.social_vimeo_link.info"
251251
}
252252
]
253+
},
254+
{
255+
"name": "t:settings_schema.favicon.name",
256+
"settings": [
257+
{
258+
"type": "image_picker",
259+
"id": "favicon",
260+
"label": "t:settings_schema.favicon.settings.favicon.label",
261+
"info": "t:settings_schema.favicon.settings.favicon.info"
262+
}
263+
]
253264
}
254265
]

layout/password.liquid

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<link rel="canonical" href="{{ canonical_url }}">
99
<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
1010

11+
{%- if settings.favicon != blank -%}
12+
<link rel="icon" type="image/png" href="{{ settings.favicon | img_url: '32x32' }}">
13+
{%- endif -%}
14+
1115
{%- unless settings.type_header_font.system? -%}
1216
<link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin>
1317
{%- endunless -%}

layout/theme.liquid

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<link rel="canonical" href="{{ canonical_url }}">
99
<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
1010

11+
{%- if settings.favicon != blank -%}
12+
<link rel="icon" type="image/png" href="{{ settings.favicon | img_url: '32x32' }}">
13+
{%- endif -%}
14+
1115
{%- unless settings.type_header_font.system? -%}
1216
<link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin>
1317
{%- endunless -%}

locales/en.default.schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@
157157
"info": "https://vimeo.com/shopify"
158158
}
159159
}
160+
},
161+
"favicon": {
162+
"name": "Favicon",
163+
"settings": {
164+
"favicon": {
165+
"label": "Favicon image",
166+
"info": "Will be scaled down to 32 x 32px"
167+
}
168+
}
160169
}
161170
},
162171
"sections": {

templates/gift_card.liquid

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
<link rel="canonical" href="{{ canonical_url }}">
1212
<link rel="preconnect" href="https://cdn.shopify.com" crossorigin>
1313

14+
{%- if settings.favicon != blank -%}
15+
<link rel="icon" type="image/png" href="{{ settings.favicon | img_url: '32x32' }}">
16+
{%- endif -%}
17+
1418
{%- unless settings.type_header_font.system? -%}
1519
<link rel="preconnect" href="https://fonts.shopifycdn.com" crossorigin>
1620
{%- endunless -%}

0 commit comments

Comments
 (0)