Skip to content

Commit 0e948fc

Browse files
authored
test pwa (#1035)
* chore: remove databend.rs redirect * fix: format * chore: remove redirects * remove useless * fix: erro links * feat: add pwa test * rename
1 parent 99f9fcf commit 0e948fc

File tree

4 files changed

+1006
-22
lines changed

4 files changed

+1006
-22
lines changed

docusaurus.config.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,46 @@ const config: Config = {
201201
},
202202
},
203203
},
204-
]
204+
],
205+
[
206+
'@docusaurus/plugin-pwa',
207+
{
208+
debug: true,
209+
offlineModeActivationStrategies: [
210+
'appInstalled',
211+
'standalone',
212+
'queryString',
213+
],
214+
pwaHead: [
215+
{
216+
tagName: 'link',
217+
rel: 'icon',
218+
href: '/img/logo/logo-no-text.png',
219+
},
220+
{
221+
tagName: 'link',
222+
rel: 'manifest',
223+
href: '/manifest.json',
224+
},
225+
{
226+
tagName: 'meta',
227+
name: 'theme-color',
228+
content: '#d675c3',
229+
},
230+
{
231+
tagName: 'meta',
232+
name: 'apple-mobile-web-app-capable',
233+
content: 'yes',
234+
},
235+
{
236+
tagName: 'meta',
237+
name: 'apple-mobile-web-app-status-bar-style',
238+
content: 'black-translucent',
239+
},
240+
],
241+
},
242+
],
243+
205244
],
206245
themes: ['@docusaurus/theme-mermaid'],
207246
markdown: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@ant-design/icons": "^5.3.7",
2727
"@docusaurus/core": "3.4.0",
2828
"@docusaurus/plugin-client-redirects": "^3.4.0",
29+
"@docusaurus/plugin-pwa": "^3.4.0",
2930
"@docusaurus/preset-classic": "3.4.0",
3031
"@docusaurus/theme-mermaid": "^3.4.0",
3132
"@mdx-js/react": "^3.0.0",

static/manifest.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"short_name": "Databend",
3+
"name": "Databend Documentation",
4+
"icons": [
5+
{
6+
"src": "/img/logo/logo-no-text.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/img/logo/logo-no-text.png",
12+
"sizes": "512x512",
13+
"type": "image/png"
14+
}
15+
],
16+
"start_url": "/",
17+
"background_color": "#f7f0eb",
18+
"display": "standalone",
19+
"scope": "/",
20+
"theme_color": "#d675c3"
21+
}

0 commit comments

Comments
 (0)