Skip to content

Commit 535b7f6

Browse files
makisevonreuixiy
authored andcommitted
feat: update web app icons (#475)
Fixes #474.
1 parent 2cf3e6a commit 535b7f6

File tree

11 files changed

+58
-47
lines changed

11 files changed

+58
-47
lines changed

config-examples/en/config.toml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -554,24 +554,29 @@ uglyURLs = false
554554

555555
# Note: go to https://realfavicongenerator.net/
556556
# to generate related icons and
557-
# files, unzip after downloading,
558-
# and keep only android-chrome-512x512.png,
559-
# apple-touch-icon.png, mstile-150x150.png,
560-
# safari-pinned-tab.svg, favicon.ico,
561-
# site.webmanifest these files,
562-
# delete the rest. Then move
563-
# these files to the ~/blog/static/icons/
564-
# directory, move favicon.ico,
565-
# site.webmanifest to the ~/blog/static/
566-
# directory, and finally rename
567-
# site.webmanifest to manifest.json,
568-
# and check and modify related
569-
# content (the path of the icons).
557+
# files, unzip after downloading.
558+
# Then move these files to the
559+
# ~/blog/static/icons/ directory,
560+
# move favicon.ico, site.webmanifest
561+
# to the ~/blog/static/ directory,
562+
# and finally rename site.webmanifest
563+
# to manifest.json, and check
564+
# and modify related content
565+
# (the path of the icons).
566+
567+
# ATTENTION: To check your favicon, plese
568+
# go to https://realfavicongenerator.net/favicon-checker.
569+
# If any problems are detected,
570+
# check the filename differences
571+
# between the generated files
572+
# and the related files in the
573+
# ~/blog/themes/meme/static/ directory.
574+
# If there are any differences,
575+
# it means some files may be outdated.
576+
# Please create an issue if necessary.
570577

571578
themeColor = "#fff"
572579
themeColorDark = "#16171d"
573-
safariMaskColor = "#2a6df4"
574-
msApplicationTileColor = "#fff"
575580

576581

577582
######################################

config-examples/zh-cn/config.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,23 +508,24 @@ uglyURLs = false
508508
# 网页应用
509509

510510
# 说明:前往 https://realfavicongenerator.net/
511-
# 生成相关图标和文件,下载后解压,仅保留
512-
# android-chrome-512x512.png、
513-
# apple-touch-icon.png、
514-
# mstile-150x150.png、
515-
# safari-pinned-tab.svg、favicon.ico、
516-
# site.webmanifest 这些文件,删除其余。
511+
# 生成相关图标和文件,下载后解压。
517512
# 然后将这些文件移动到 ~/blog/static/icons/
518513
# 目录下,再将 favicon.ico、site.webmanifest
519514
# 移动到 ~/blog/static/ 目录下,
520515
# 最后将 site.webmanifest 重命名为
521516
# manifest.json,并检查和修改相关内容
522517
# (图标的路径)。
523518

519+
# 注意:要检查你的图标
520+
# 请前往 https://realfavicongenerator.net/favicon-checker。
521+
# 如果检测到任何问题,检查生成的文件和
522+
# ~/blog/themes/meme/static/ 目录下
523+
# 相关文件的文件名差异。如果有差异,
524+
# 这意味着某些文件可能已经过时。
525+
# 如有需要,请提 Issue。
526+
524527
themeColor = "#fff"
525528
themeColorDark = "#16171d"
526-
safariMaskColor = "#2a6df4"
527-
msApplicationTileColor = "#fff"
528529

529530

530531
######################################

config-examples/zh-tw/config.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,23 +508,24 @@ uglyURLs = false
508508
# 網頁應用
509509

510510
# 說明:前往 https://realfavicongenerator.net/
511-
# 生成相關圖示和檔案,下載後解壓,僅保留
512-
# android-chrome-512x512.png、
513-
# apple-touch-icon.png、
514-
# mstile-150x150.png、
515-
# safari-pinned-tab.svg、favicon.ico、
516-
# site.webmanifest 這些檔案,刪除其餘。
511+
# 生成相關圖示和檔案,下載後解壓。
517512
# 然後將這些檔案移動到 ~/blog/static/icons/
518513
# 目錄下,再將 favicon.ico、site.webmanifest
519514
# 移動到 ~/blog/static/ 目錄下,
520515
# 最後將 site.webmanifest 重新命名為
521516
# manifest.json,並檢查和修改相關內容
522517
# (圖示的路徑)。
523518

519+
# 注意:要檢查你的圖標
520+
# 請前往 https://realfavicongenerator.net/favicon-checker。
521+
# 如果偵測到任何問題,檢查生成的檔案和
522+
# ~/blog/themes/meme/static/ 目錄下
523+
# 相關檔案的檔案名稱差異。如果有差異,
524+
# 這意味著某些文件可能已經過時。
525+
# 如有需要,請提 Issue。
526+
524527
themeColor = "#fff"
525528
themeColorDark = "#16171d"
526-
safariMaskColor = "#2a6df4"
527-
msApplicationTileColor = "#fff"
528529

529530

530531
######################################

layouts/partials/head.html

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,20 @@
5050
<meta name="description" content="{{ $description }}" />
5151

5252
<!-- Favicon, Icons, Web App -->
53-
{{- $favicon := "favicon.ico" -}}
54-
{{- $safariMaskIcon := "icons/safari-pinned-tab.svg" -}}
55-
{{- $safariMaskColor := .Site.Params.safariMaskColor -}}
53+
{{- $icoFavicon := "favicon.ico" -}}
54+
{{- $svgFavicon := "icons/favicon.svg" -}}
55+
{{- $pngFavicon := "icons/favicon-96x96.png" -}}
5656
{{- $appleTouchIcon := "icons/apple-touch-icon.png" -}}
57-
{{- $msApplicationStartURL := partial "utils/relative-url.html" (dict "$" . "filename" "") -}}
58-
{{- $msApplicationTileColor := .Site.Params.msApplicationTileColor -}}
59-
{{- $msApplicationTileImage := partial "utils/relative-url.html" (dict "$" . "filename" "icons/mstile-150x150.png") -}}
6057
{{- $manifest := "manifest.json" -}}
61-
<link rel="shortcut icon" href="{{ $favicon | relURL }}" type="image/x-icon" />
62-
<link rel="mask-icon" href="{{ $safariMaskIcon | relURL }}" color="{{ $safariMaskColor }}" />
63-
<link rel="apple-touch-icon" sizes="180x180" href="{{ $appleTouchIcon | relURL }}" />
58+
<link rel="shortcut icon" type="image/x-icon" href="{{ $icoFavicon | relURL }}" />
59+
<link rel="icon" type="image/svg+xml" href="{{ $svgFavicon | relURL }}" />
60+
<link rel="icon" type="image/png" href="{{ $pngFavicon | relURL }}" sizes="96x96" />
61+
<link rel="apple-touch-icon" href="{{ $appleTouchIcon | relURL }}" sizes="180x180" />
6462
<meta name="apple-mobile-web-app-capable" content="yes" />
6563
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}" />
6664
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
6765
<meta name="mobile-web-app-capable" content="yes" />
6866
<meta name="application-name" content="{{ .Site.Title }}" />
69-
<meta name="msapplication-starturl" content="{{ $msApplicationStartURL }}" />
70-
<meta name="msapplication-TileColor" content="{{ $msApplicationTileColor }}" />
71-
<meta name="msapplication-TileImage" content="{{ $msApplicationTileImage }}" />
7267
<link rel="manifest" href="{{ $manifest | relURL }}" />
7368

7469
<!-- Atom / RSS -->

static/icons/favicon-96x96.png

4.85 KB
Loading

static/icons/favicon.svg

Lines changed: 3 additions & 0 deletions
Loading

static/icons/mstile-150x150.png

-3.83 KB
Binary file not shown.

static/icons/safari-pinned-tab.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
10.7 KB
Loading

0 commit comments

Comments
 (0)