WriteFreely blog as Progressive Web App

It would be convenient to have WriteFreely blogs exposed as Progressive Web Apps - they increase visitor engagement by adding sites to their mobile devices as apps and therefore having much easier access. Also PWA has nice visual appeal by adding color to browser tab when visiting. Making blogs exposed as PWAs can be implemented following Gitea’s example:

Expose JSON file with colors, title and icons like:

{
    "short_name": "Gitea",
    "name": "Gitea - Git with a cup of tea",
    "icons": [
      {
        "src": "/img/gitea-lg.png",
        "type": "image/png",
        "sizes": "880x880"
      },
      {
        "src": "/img/gitea-sm.png",
        "type": "image/png",
        "sizes": "120x120"
      },
      {
        "src": "/img/gitea-512.png",
        "type": "image/png",
        "sizes": "512x512"
      },
      {
        "src": "/img/gitea-192.png",
        "type": "image/png",
        "sizes": "192x192"
      }
    ],
    "start_url": "/",
    "scope": "/",
    "background_color": "#FAFAFA",
    "display": "standalone",
    "theme_color": "#6cc644"
  }

And link it in site HEAD:

<link rel="manifest" href="/manifest.json" crossorigin="use-credentials">

Steps to implement:

  • Each blog should have own manifest JSON generated based on customization settings;
  • Favicon/icon upload and resize needed (maybe as part of image upload implementation);
  • Add and use JavaScript color picker to help choose color(s).

That’s a great idea @gytisrepecka! It’d be especially interesting making it a PWA helped you write to your WF blog easier on mobile. Have you tried to implement it on your blog yet? I’d be curious to see it in action.

From technical point-of-view Progressive Web App is rendered using Android’s internal browser engine (Chromium), so it would work pretty much the same as user visiting WriteFreely on browser. On the other hand, user skips one step: no need to open browser and go to website when you already have an icon between apps.

I need to explore more if maybe login credentials could be stored in generic Android Accounts framework - that would be awesome :relaxed:

I am in progress setting up development environment on CentOS 7/8, will post some screenshots as soon as I have working prototype :nerd_face:

1 Like