forked from mirror/NitWikit
PWA 支持(测试)
This commit is contained in:
parent
229b77a440
commit
762005f942
@ -77,6 +77,32 @@ const config = {
|
||||
editCurrentVersion: true,
|
||||
showLastUpdateAuthor: true,
|
||||
showLastUpdateTime: true,
|
||||
}],[
|
||||
'@docusaurus/plugin-pwa',
|
||||
{
|
||||
debug: true,
|
||||
offlineModeActivationStrategies: [
|
||||
'appInstalled',
|
||||
'standalone',
|
||||
'queryString',
|
||||
],
|
||||
pwaHead: [
|
||||
{
|
||||
tagName: 'link',
|
||||
rel: 'icon',
|
||||
href: '/img/book.png',
|
||||
},
|
||||
{
|
||||
tagName: 'link',
|
||||
rel: 'manifest',
|
||||
href: '/manifest.json', // your PWA manifest
|
||||
},
|
||||
{
|
||||
tagName: 'meta',
|
||||
name: 'theme-color',
|
||||
content: 'rgb(37, 194, 160)',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
[
|
||||
|
1532
package-lock.json
generated
1532
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,6 +18,7 @@
|
||||
"@docusaurus/core": "^3.5.1",
|
||||
"@docusaurus/plugin-content-docs": "^3.5.1",
|
||||
"@docusaurus/plugin-debug": "^3.5.1",
|
||||
"@docusaurus/plugin-pwa": "^3.5.1",
|
||||
"@docusaurus/plugin-sitemap": "^3.5.1",
|
||||
"@docusaurus/preset-classic": "^3.5.1",
|
||||
"@docusaurus/theme-mermaid": "^3.5.1",
|
||||
|
22
static/manifest.json
Normal file
22
static/manifest.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "笨蛋文档",
|
||||
"short_name": "笨蛋文档",
|
||||
"theme_color": "#2196f3",
|
||||
"background_color": "#424242",
|
||||
"display": "standalone",
|
||||
"scope": "./",
|
||||
"start_url": "./index.html",
|
||||
"related_applications": [
|
||||
{
|
||||
"platform": "webapp",
|
||||
"url": "https://yizhan.wiki/NitWikit/manifest.json"
|
||||
}
|
||||
],
|
||||
"icons": [
|
||||
{
|
||||
"src": "img/book.png",
|
||||
"sizes": "160x160",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user