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

Add PWA support #1086

Merged
merged 9 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/playground/website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="stylesheet" href="/src/styles.css" />
<link rel="manifest" href="/manifest.json" />
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-SVTNFCP8T7"
Expand Down
Binary file added packages/playground/website/public/logo-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/playground/website/public/logo-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/playground/website/public/logo-384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/playground/website/public/logo-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions packages/playground/website/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone",
"scope": "/",
"start_url": "/",
"short_name": "WordPress Playground",
"description": "WordPress Playground",
"name": "WordPress Playground",
"icons": [
{
"src": "/website-server/logo-192.png",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This path only works on the local dev server. In production it will be just /logo-192.png.

Copy link
Collaborator Author

@bgrgicak bgrgicak Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a separate production manifest with the correct URL 21558f7

"sizes": "192x192",
"type": "image/png"
},
{
"src": "/website-server/logo-256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/website-server/logo-384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/website-server/logo-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Loading