Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoD 2021] Added Progressive Web Application (PWA) support for the Docusaurus site #910

Merged
merged 15 commits into from
Sep 11, 2021
Merged
28 changes: 28 additions & 0 deletions docusaurus/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,33 @@ module.exports = {
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)',
},
],
},
],
],
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.png",
"sizes":"512x512",
"type":"image/png"
},
{
"src":"img/pwa/android/android-launchericon-192-192.png",
"sizes":"192x192",
"type":"image/png"
},
{
"src":"img/pwa/android/android-launchericon-144-144.png",
"sizes":"144x144",
"type":"image/png"
},
{
"src":"img/pwa/android/android-launchericon-48-48.png",
"sizes":"48x48",
"type":"image/png"
},
{
"src":"img/pwa/chrome/chrome-installprocess-128-128.png",
"sizes":"128x128",
"type":"image/png"
},
{
"src":"img/pwa/chrome/chrome-extensionmanagementpage-48-48.png",
"sizes":"48x48",
"type":"image/png"
},
{
"src":"img/pwa/chrome/chrome-favicon-16-16.png",
"sizes":"16x16",
"type":"image/png"
},
{
"src":"img/pwa/firefox/firefox-marketplace-512-512.png",
"sizes":"512x512",
"type":"image/png"
},
{
"src":"img/pwa/firefox/firefox-general-128-128.png",
"sizes":"128x128",
"type":"image/png"
},
{
"src":"img/pwa/firefox/firefox-general-48-48.png",
"sizes":"48x48",
"type":"image/png"
},
{
"src":"img/pwa/firefox/firefox-general-16-16.png",
"sizes":"16x16",
"type":"image/png"
}
]
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,8 @@
"scripts": {
"pre-push": "npx git-scripts-pre-push"
}
},
"dependencies": {
"@docusaurus/plugin-pwa": "^2.0.0-beta.0"
}
}