How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

Adding a progressive web app to websites is common nowadays and many of the big websites are using it instead of the classic android app or iOS app.

When browsing a website with the PWA feature, you will get a call to action notice, asking you to install their app to your computer. This way, you can install a light-weight app which offers a native app experience. This will be good for smartphone users and can help your audience easily access your website with just a single click rather than having to open the web browser and typing your website address.

For today's tutorial, we are going to walk you through the steps on how to make a progressive web app (PWA) for your Blogger website.

Adding this feature to a WordPress site is pretty easy via numerous plugins. But for a Blogger site, we will have to create our PWA manifest file and load it from and external source. Also, note that for the time being, this PWA for Blogger won't work for PC owing to the lack of the service-worker.js.

But you should be able to use this guide to get it working for your smartphone. All you have to do is follow the simple steps below.

What is a Progressive Web App?

A progressive web application is a type of application software delivered through the web, built using common web technologies including HTML, CSS and JavaScript. It is intended to work on any platform that uses a standards-compliant browser. 

PWAs are built to take advantage of native mobile device features, without requiring the end-user to visit an app store, make a purchase and download software locally.

Unlike traditional apps, progressive web apps are a hybrid between regular web pages and mobile applications.

Making a Progressive Web App for your Blogger website

In order to make this work normally, you will have to;
  1. Create icons of different sizes for your PWA. Icons should be the favicon of your Blogger site.
  2. Creat a manifiest.json file for the PWA containing details like site name/title, icons of different sizes for different devices, site link, etc.
  3. Hosting and using the manifest.json 

1. creating icons of the correct sizes and format

To start, you will need to create icons of different sizes for your PWA to be installed on your Blogger site.

To generate icons of different sizes, you can either use favicon.io or makeappicon.com. And if your logo is one generated from a text, it is advisable you make the background transparent. 

After generating your icons from one of the sites recommended below, you will have a zip file available for download, and in there, you will find icons of different sizes to use.

You will have to upload the images to your Blogger blog. Simply create a draft post or page, upload them and get the image links.

You can now move to the next step which is configuring the manifest.json file for the PWA.

2. Creating and configuring your manifest.json

Below, we have a sample manifest.json file we are using for one of our Blogger blog It's Apple OS.


 {
"name": "It's Apple OS",
"short_name": "It's Apple OS",
"start_url": "https://www.itsappleos.com/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#1a73e8",
"description": "It's Apple OS is all about iPhone signed ipsw files, iOS Tools, Apps sale, news and tricks",
"icons": [{
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzDvllBlz-NrNCFCshX8kuDBZmudykejfx_kJiOEUYaBT5PzWZ7WiPr_A26g_ryvCaCMYEI8JkDL1YyI7iKd64thZAGTZb57RGl8eCBijcoy8wxtn2cpz2ZUrlLfBoji9zTBql10yPdGHS/s400/iaos36.png' rel='apple-touch-icon",
"sizes": "36x36",
"type": "image/png",
"density": "0.75"
}, {
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq4gwkpDGbDy1jVYbpKHNAm7pF7V1XkXuUO02_rAcPOXr6johvPkmvDTSTjIQubKr8vONHvDk52Vr36z0tOwJr0n7Zh9BamSMjwSP89xyrgxa2r1QYN0g7ENmAhFTKoHo-60UxEw28WCFJ/s1600/iaos48.png' rel='apple-touch-icon' rel='apple-touch-icon",
"sizes": "48x48",
"type": "image/png",
"density": "1.0"
}, {
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIaFUhzZDZC1tPsXhA1Pdjtw00KMYeKYtuY8edVeI8PmrUX2amLEgxQ7MkPKZ1oLrtigFzQg9XNAWFmh-CphYaSxj6o5xzYRLlT-r61BYzY_wedquTCtQYdClpR0VSJgRbjpR72tmOPtnR/s400/iaos72.png' rel='apple-touch-icon",
"sizes": "72x72",
"type": "image/png",
"density": "1.5"
}, {
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQAq1v2-BHnvFb3Z3sd_kyCRds4NY1pfVb6B3M4IliLMdn7T5MqqXofbpmG5BiY16PEa2r36_EFSws4y_3SqTI_KkqG2rfhYLSlD-I543LUCra1eBFdFbreLhLP0eMasdiF28UDbLRbAhF/s400/iaos96.png",
"sizes": "96x96",
"type": "image/png",
"density": "2.0"
}, {
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj47AESRxubF4xm_d8xZ7mq_oarfCwiWOcDj8ufXXE7-eQyOzpw4T-a57tExJV9bbC6cyggJcsMRYvXrCcuUsbSOAYJ8eV8pmTnxHzGgwL_qDnHYNQfZwxR6yK6kuFAvd7f2V3HVETjHGv8/s1600/iaos144.png' rel='apple-touch-icon",
"sizes": "144x144",
"type": "image/png",
"density": "3.0"
}, {
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjooOVQQvlCXkQzJgb_aB5Ir1aYMyUet78m-O1RZXzgIKifpd1cqFvAGaUSuA39IStYQ7c5bGMBNHhc4MltwWAyi540lEDIHKB-XGdxlRlnsUbWkIo3maFzMplpwA1KkDJNSxhg24XLIZlS/s400/iaos192.png' rel='apple-touch-icon",
"sizes": "192x192",
"type": "image/png",
"density": "4.0"
}, {
"src": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0yeoCH9NO-i6XgqZPw385UhNuGdpg8sCCjNSuk7OYupkY4QV7pp9L-p-h8ArUCL_PPyvngOKdkzbAJp9UpQyzi-Jb-5XHg_DD_vxaDqrNrm9q6bs_Bv6j8vStslvfJ3bhhJw0erHZd506/s320/iaos512.png' rel='apple-touch-icon",
"sizes": "512x512",
"type": "image/png",
"density": "5.0"
}]
}

What you will have to do here is change the image links, site name, short name and description to match that of your site.

Using Notepad++ create a new file named manifest.json and then copy the code above and paste it there. Perform the modifications as explained above and save.

Where to host your manifest.json file.

Since Blogger doesn't have any root directory where you can store your website files like scripts, you will have to upload it somewhere else and load it from where it is hosted.

We recommend using Github to host the manifest or Drivehq. And for those who want to use Github, after hosting the manifest.json file, you can get the link using Githack.

With Drivehq, after uploading the manifest file, simply click on it and click on "publish' to get the link.

Once you've hosted your manifest.json file and gotten the link, you can then insert the link to your website head section. The line of code to be added should look like this;


<!-- Rel Manifest Link --> 
<link rel ="manifest" href ="manifest.json link here"/>

To add the manifest.json, login to your Blogger dashboard and go to Theme > Edit HTML and then paste the line of code above in the head section of the HTML code. Note that you have to change "manifest.json link here" and put your manifest.json file link from Github or Drivehq.

Also, add the meta tag below for the apple mobile web app title.


<meta  name ="apple-mobile-web-app-title"  expr: content ="data: blog.title"/>

What to note:


  • You blogger site should have a meta description tag
  • Your images used should respect the resolutions specified on the manifest.json
  • Use images of high resolution.
  • Take a backup of your theme before trying this out.

Installing the PWA to your device.

How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

How to make progressive web app (PWA) for your Blogger website

As we said above, there is no service worker so you won't get the option asking to install the PWA for your Blogger site when using Chrome desktop.

But on mobile, to add it to the home screen, simply click on the three dots at the top-right corner and choose 'Add to Home Screen'. The PWA for your Blogger site will then be added to the home screen and ready for use.

Post a Comment

0 Comments