Add a webmanifest file for home screen installation

A webmanifest file means the website can be """installed""" to its own home screen icon on phones, which also gives it its own card in the app switcher, hides the browser UI, and stops it from being mixed in with other browser tabs.

I can submit a patchset to add a webmanifest if you'd like.

Assigned to
a month ago
18 days ago
1.0 Enhancement

~hristoast a month ago

Hey ~cadence, thank you so much for submitting this! Such a great idea, and something I was unaware of.

I'd love it if you submitted a patch to add this, otherwise I'll make some time to add it this weekend.

~hristoast a month ago

Just an FYI, I plan to implement this today.

~hristoast REPORTED IMPLEMENTED a month ago

This has been added. It's on the dev branch, please give it a try and LMK any issues.

~cadence a month ago

I checked the code and it looks good apart from a couple things:

  • I believe the start URL should probably be /
  • The name should be fairly short because it will be shown as the home screen icon label. On my phone you can probably fit about 8 characters. If it doesn't fit, the home screen will truncate it with ..., which isn't super pretty.

Otherwise, seems great!

~hristoast IMPLEMENTED REPORTED 22 days ago

~hristoast 22 days ago

Hey ~cadence

Sorry about the delayed response, for whatever reason the email from todo.sr.ht got thrown into my spam folder! I happened to look there just now and notice it.

Thanks a bunch for the feedback. I'll commit some changes based on your comments in the next day or so and will update this thread when I do.

~cadence 21 days ago

An addendum to a past message: I checked the webmanifest docs and it turns out that relative URLs are relative to the manifest file, so the current start_url in the webmanifest should be fine provided that you don't move the location of the manifest file later.

~hristoast 21 days ago

Thanks! I'll probably change it to / just to be explicit, unless that breaks something.

~hristoast 19 days ago

For now, I've hardcoded the name to just be MousikóFídi, and start_url is now /.

In the future, I'd like to make several of the webmanifest fields configurable, including the name. For now I think MousikóFídi is a sane default, and it should be short enough to not overflow on small viewports.

~cadence 19 days ago

Thanks, I think that works well. You can mark this as done.

~hristoast REPORTED IMPLEMENTED 18 days ago

Thank you for the feedback, closing this one out.

Register here or Log in to comment, or comment via email.