Skip to content

Commit

Permalink
refactor(layouts.head): improve favicon rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
alebabai committed Mar 27, 2024
1 parent a2dd777 commit 5e5e901
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<meta name="viewport" content="width=device-width">
{{- $title := cond (eq .Path "/404") (.GetPage "/_404" | default .).Title .Title }}
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" $title site.Title }}{{ end }}</title>
<link rel="icon" type="image/x-icon" href="{{ relURL "favicon.ico" }}">
{{ partialCached "head/favicon.html" . }}
{{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }}
4 changes: 4 additions & 0 deletions layouts/partials/head/favicon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<link rel="apple-touch-icon" sizes="180x180" href={{ relURL "apple-touch-icon.png" }}>
<link rel="icon" type="image/png" sizes="32x32" href={{ relURL "favicon-32x32.png" }}>
<link rel="icon" type="image/png" sizes="16x16" href={{ relURL "favicon-16x16.png" }}>
<link rel="icon" type="image/x-icon" href="{{ relURL "favicon.ico" }}">
Binary file added static/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/favicon.ico
Binary file not shown.

0 comments on commit 5e5e901

Please sign in to comment.