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

added initial pwa support via docusaurus plugin #48

Merged
merged 6 commits into from Oct 7, 2020

Conversation

wolffshots
Copy link
Contributor

As per issue #34 I have added the PWA plugin to the project and followed the Docusaurus guide to configure it

If you load the page (using npm run build and npm run serve because it only activates the plugin during a production build) with the developer console open you can see that it does spawn a service worker and work to cache the assets but it doesn't pop up with an option to install the page

@lelouchB lelouchB linked an issue Oct 7, 2020 that may be closed by this pull request
@lelouchB
Copy link
Owner

lelouchB commented Oct 7, 2020

Hey @jadonwolffs
I will look into this and get back to you shortly.

Thanks

@lelouchB
Copy link
Owner

lelouchB commented Oct 7, 2020

Hey @jadonwolffs
Few things :

  • Move the plugins code from top to bottom in docusaurus.config.js
  • Add few additonal details in manifest.json,
    "lang": "en",
    "start_url": "https://finalspaceapi.com",
  • I guess the problem is with images, they are mandatory in manifest.json. We need to generate square images for this.

image

I understand with the current logo, generating square pics of various dimensions will not be possible. There is seperate for logo and people are working on it.

For now, use this image to generate various dimensions square images and store them in a seperate directory in static/img folder
Use this tool https://www.pwabuilder.com/imageGenerator
image

Resources:
https://developer.mozilla.org/en-US/docs/Web/Manifest
https://developer.mozilla.org/en-US/docs/Web/Manifest/icons

@wolffshots
Copy link
Contributor Author

Woah, nice - I made these changes and it seems to work nicely! Thanks for helping me through this @lelouchB

@lelouchB lelouchB merged commit 02f422a into lelouchB:main Oct 7, 2020
@lelouchB
Copy link
Owner

lelouchB commented Oct 7, 2020

Woah, nice - I made these changes and it seems to work nicely! Thanks for helping me through this @lelouchB

Hey @jadonwolffs
Glad I could help, I was shipping this change to production.
It's live.
Also, here is a small blog on this https://finalspaceapi.com/blog/pwa/

Thanks for your valuable contributions. 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Docusarus PWA plugin
2 participants