Skip to content

Commit

Permalink
enable PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
iChunyu committed Nov 27, 2021
1 parent 22a7362 commit a7c9e63
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

14 changes: 7 additions & 7 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ theme = "DoIt"
# 日期格式
dateFormat = "2006-01-02"
# 网站图片, 用于 Open Graph 和 Twitter Cards
images = ["avatar.jpeg"]
images = ["avatar.png"]
# 开启 PWA 支持
enablePWA = false
enablePWA = true
# 版权信息
license = '本博客所有文章除特別声明外,均采用 <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"> CC BY-SA 4.0 </a> 许可协议,转载请注明出处。'
# 应用图标配置
Expand All @@ -82,7 +82,7 @@ theme = "DoIt"
# 是否隐藏网站图标资源链接
noFavicon = false
# 更现代的 SVG 网站图标, 可替代旧的 .png 和 .ico 文件
svgFavicon = "avatar.jpeg"
svgFavicon = "avatar.png"
# Safari 图标颜色
iconColor = "#5bbad5"
# Windows v8-10磁贴颜色
Expand Down Expand Up @@ -197,7 +197,7 @@ theme = "DoIt"
# 主页显示头像的 URL
# 将你的头像文件放置于 static 或者 assets 目录下
# 文件路径是相对于 static 或者 assets 目录的
avatarURL = "avatar.jpeg"
avatarURL = "avatar.png"
# 主页显示的网站标题 (支持 HTML 格式)
title = "某春雨的后花园"
# 主页显示的网站副标题
Expand All @@ -219,7 +219,7 @@ theme = "DoIt"

# 作者的社交信息设置
[params.social]
GitHub = "https://github.com/iChunyu"
GitHub = "iChunyu"
Linkedin = ""
Twitter = ""
Instagram = ""
Expand Down Expand Up @@ -540,7 +540,7 @@ theme = "DoIt"
# 出版者信息
[params.page.seo.publisher]
name = ""
logoUrl = "avatar.jpeg"
logoUrl = "avatar.png"

# 赞赏配置
[params.sponsor]
Expand Down Expand Up @@ -662,7 +662,7 @@ theme = "DoIt"
name = "大春雨"
email = "chunyu2018@foxmail.com"
link = ""
avatar = "avatar.jpeg"
avatar = "avatar.png"
gravatarEmail = ""

# 网站地图配置
Expand Down
Binary file removed static/avatar.jpeg
Binary file not shown.
Binary file added static/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions static/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>
27 changes: 27 additions & 0 deletions static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "某春雨的后花园",
"short_name": "后花园",
"start_url": "/",
"theme_color": "#ffffff",
"background_color": "#ffffff",
"orientation": "portrait",
"display": "standalone",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/apple-touch-icon.png",
"sizes": "180x180",
"type": "image/png",
"purpose": "any maskable"
}
]
}

0 comments on commit a7c9e63

Please sign in to comment.