add favicon.html

This commit is contained in:
geekifan
2025-04-21 22:02:39 +08:00
parent 30c459948a
commit 48785f6a48
10 changed files with 63 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,13 @@
---
layout: compress
---
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="{{ '/assets/img/favicons/mstile-150x150.png' | relative_url }}" />
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,26 @@
---
layout: compress
---
{% assign favicon_path = "/assets/img/favicons" | relative_url %}
{
"name": "{{ site.title }}",
"short_name": "{{ site.title }}",
"description": "{{ site.description }}",
"icons": [
{
"src": "{{ favicon_path }}/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "{{ favicon_path }}/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}],
"start_url": "{{ '/index.html' | relative_url }}",
"theme_color": "#2a1e6b",
"background_color": "#ffffff",
"display": "fullscreen"
}

View File

@ -0,0 +1,24 @@
<!--
The Favicons for Web, Android, Microsoft, and iOS (iPhone and iPad) Apps
Generated by: https://realfavicongenerator.net/
-->
{{- $favicon := resources.Get "img/favicons/apple-touch-icon.png" -}}
{{- $favicon32 := resources.Get "img/favicons/favicon-32x32.png" -}}
{{- $favicon16 := resources.Get "img/favicons/favicon-16x16.png" -}}
{{- $faviconIco := resources.Get "img/favicons/favicon.ico" -}}
{{- $webmanifest := resources.Get "img/favicons/site.webmanifest" -}}
{{- $browserconfig := resources.Get "img/favicons/browserconfig.xml" -}}
<link rel="apple-touch-icon" sizes="180x180" href="{{ $favicon.RelPermalink }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ $favicon32.RelPermalink }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ $favicon16.RelPermalink }}">
{{ if site.Params.pwa.enabled }}
<link rel="manifest" href="{{ $webmanifest.RelPermalink }}">
{{ end }}
<link rel="shortcut icon" href="{{ $faviconIco.RelPermalink }}">
<meta name="apple-mobile-web-app-title" content="{{ site.Title }}">
<meta name="application-name" content="{{ site.Title }}">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="{{ $browserconfig.RelPermalink }}">
<meta name="theme-color" content="#ffffff">