souldanger / jekyll-pwa-workbox Goto Github PK
View Code? Open in Web Editor NEWA Jekyll plugin using Workbox to make your PWA / Website available offline.
Home Page: https://rubygems.org/gems/jekyll-pwa-workbox
License: MIT License
A Jekyll plugin using Workbox to make your PWA / Website available offline.
Home Page: https://rubygems.org/gems/jekyll-pwa-workbox
License: MIT License
In my site by installing pwa using android Firefox you can see that on opening app some images automatically loads in browser. I mean it going to some image links automatically.
Hi, thanks for making this plugin. I have already a service worker file for onesignal. can I put this plugin's service worker js code in sw.js file of that or can I use as a separate one.
So I build my Jekyll site on Github using a GitHub Action. When I test it locally, it compiles without a hitch. And when I only enable the PWA for my small recipes folder, it runs fine in both places.
But when I enable it for the drinks section I have, it breaks, but only when I run it on the GitHub Action (running ubuntu). it builds just fine on my local machine (Mac OS).
I think this might be how to fix it: https://stackoverflow.com/questions/23309669/ruby-encode-xc3-from-ascii-8bit-to-utf-8-encodingundefinedconversionerr/23382078
but I'm not sure if that means changing the code in the plugin or if I need to do something in the GitHub Action.
/github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-pwa-workbox-5.1.41/lib/jekyll-pwa-workbox.rb:89:in `to_json': "\\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
155
jekyll 3.9.0 | Error: "\xC3" from ASCII-8BIT to UTF-8
Hi,
I ran into an issue when I changed the path of the sw_dest_filename to assests/js or any other sub folder. He issue was that the scope of the webmanifest was not the same as the scope of the service worker.
The scope of the webmanifest was set to "/", but the service worker was on "/assests/js/".
When registering a service worker it is also possible to pass the scope via the options parameter of navigator.serviceWorker.register, see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register.
If found a good explanation on https://dev.to/njromano/how-to-scope-your-pwa-service-workers-1n6m.
Would it be possible to add it to the lib? Or would you accept a pull request?
Regards,
Jochen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.