Skip to content

Commit

Permalink
[GSoD 2021] Added Progressive Web Application (PWA) support for the D…
Browse files Browse the repository at this point in the history
…ocusaurus site (#910)

* added pwa manifest file and images

Signed-off-by: Rajiv Ranjan Singh <[email protected]>

* added PWA for docusaurus

Signed-off-by: Rajiv Ranjan Singh <[email protected]>

* added pwa package

Signed-off-by: Rajiv Ranjan Singh <[email protected]>

* added pwa images

Signed-off-by: Rajiv Ranjan Singh <[email protected]>

* fix: converted png to webp

Signed-off-by: Rajiv Ranjan Singh <[email protected]>

Co-authored-by: Huan (李卓桓) <[email protected]>
Co-authored-by: Rohitesh Kumar Jain <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2021
1 parent 9914d4c commit 0cfbff2
Show file tree
Hide file tree
Showing 14 changed files with 105 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,34 @@ const config = {
plugins: [
'@ionic-internal/docusaurus-plugin-tag-manager',
require.resolve('./src/plugins/qrcode'),
[
'@docusaurus/plugin-pwa',
{
debug: true,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: '/img/icon.png',
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json', // your PWA manifest
},
{
tagName: 'meta',
name: 'theme-color',
content: 'rgb(8, 168, 56)',
},
],
},
],
],
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
74 changes: 74 additions & 0 deletions docusaurus/static/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"short_name":"Wechaty",
"Name":"Wechaty",
"description":"Conversational RPA SDK for Chatbot Makers",
"display":"standalone",
"scope":"./",
"theme_color":"#44a838",
"background_color":"#ffffff",
"lang":"en",
"start_url":"./",
"related_applications":[
{
"platform":"webapp",
"url":"https://wechaty.js.org/manifest.json"
}
],
"icons":[
{
"src":"img/pwa/android/android-launchericon-512-512.webp",
"sizes":"512x512",
"type":"image/webp"
},
{
"src":"img/pwa/android/android-launchericon-192-192.webp",
"sizes":"192x192",
"type":"image/webp"
},
{
"src":"img/pwa/android/android-launchericon-144-144.webp",
"sizes":"144x144",
"type":"image/webp"
},
{
"src":"img/pwa/android/android-launchericon-48-48.webp",
"sizes":"48x48",
"type":"image/webp"
},
{
"src":"img/pwa/chrome/chrome-installprocess-128-128.webp",
"sizes":"128x128",
"type":"image/webp"
},
{
"src":"img/pwa/chrome/chrome-extensionmanagementpage-48-48.webp",
"sizes":"48x48",
"type":"image/webp"
},
{
"src":"img/pwa/chrome/chrome-favicon-16-16.webp",
"sizes":"16x16",
"type":"image/webp"
},
{
"src":"img/pwa/firefox/firefox-marketplace-512-512.webp",
"sizes":"512x512",
"type":"image/webp"
},
{
"src":"img/pwa/firefox/firefox-general-128-128.webp",
"sizes":"128x128",
"type":"image/webp"
},
{
"src":"img/pwa/firefox/firefox-general-48-48.webp",
"sizes":"48x48",
"type":"image/webp"
},
{
"src":"img/pwa/firefox/firefox-general-16-16.webp",
"sizes":"16x16",
"type":"image/webp"
}
]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@
"scripts": {
"pre-push": "npx git-scripts-pre-push"
}
},
"dependencies": {
"@docusaurus/plugin-pwa": "^2.0.0-beta.0"
}
}

0 comments on commit 0cfbff2

Please sign in to comment.