Skip to content

Commit edac51d

Browse files
authored
[Experimental] Introduce PWA support (#216)
* PWA Test * Add PWA manifest * Change icon to 144x144 * Update logo path * Adjust img sizes * Update url * Add splash image and update theme color * Expand pwa images for different platforms * Add maskable icon * Add apple touch icon * Add apple-touch-icon link to head * Add closing tag to head link
1 parent 619aa16 commit edac51d

File tree

120 files changed

+1394
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1394
-14
lines changed

demo/docs/intro.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ title: Docusaurus OpenAPI Docs
66
slug: /
77
---
88

9+
<head>
10+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
11+
</head>
12+
913
<div align="center">
1014
<img width="200" src="https://user-images.githubusercontent.com/9343811/165975569-1bc29814-884c-4931-83df-860043b625b7.svg" />
1115
</div>

demo/docusaurus.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,34 @@ const config = {
190190
},
191191
},
192192
],
193+
[
194+
"@docusaurus/plugin-pwa",
195+
{
196+
debug: true,
197+
offlineModeActivationStrategies: [
198+
"appInstalled",
199+
"standalone",
200+
"queryString",
201+
],
202+
pwaHead: [
203+
{
204+
tagName: "link",
205+
rel: "icon",
206+
href: "/img/docusaurus-openapi-docs-logo.svg",
207+
},
208+
{
209+
tagName: "link",
210+
rel: "manifest",
211+
href: "/manifest.json", // your PWA manifest
212+
},
213+
{
214+
tagName: "meta",
215+
name: "theme-color",
216+
content: "rgb(37, 194, 160)",
217+
},
218+
],
219+
},
220+
],
193221
],
194222

195223
themes: ["docusaurus-theme-openapi-docs"],

demo/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@docusaurus/core": "2.0.1",
20+
"@docusaurus/plugin-pwa": "^2.0.1",
2021
"@docusaurus/preset-classic": "2.0.1",
2122
"@mdx-js/react": "^1.6.22",
2223
"clsx": "^1.1.1",
4.46 KB
Loading
5.92 KB
Loading
1.39 KB
Loading
17.4 KB
Loading
2.25 KB
Loading
3.05 KB
Loading

demo/static/apple-touch-icon.png

6.65 KB
Loading

0 commit comments

Comments
 (0)