diff --git a/bookwyrm/templates/embed-layout.html b/bookwyrm/templates/embed-layout.html index c619bf2dc..865203627 100644 --- a/bookwyrm/templates/embed-layout.html +++ b/bookwyrm/templates/embed-layout.html @@ -12,6 +12,7 @@ + diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index e6f8a6f84..ba53685f4 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -14,6 +14,7 @@ + {% block opengraph %} {% include 'snippets/opengraph.html' %} diff --git a/bookwyrm/templates/manifest.json b/bookwyrm/templates/manifest.json new file mode 100644 index 000000000..83ad77789 --- /dev/null +++ b/bookwyrm/templates/manifest.json @@ -0,0 +1,14 @@ +{% load static %} +{ + "name": "{{ site.name }}", + "description": "{{ site.description }}", + "icons": [ + { + "src": "{% if site.logo %}{{ media_full_url }}{{ site.logo }}{% else %}{% static 'images/logo.png' %}{% endif %}", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": "/", + "display": "standalone" +} diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 05972ee73..0759012fe 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -34,6 +34,12 @@ urlpatterns = [ "robots.txt", TemplateView.as_view(template_name="robots.txt", content_type="text/plain"), ), + path( + "manifest.json", + TemplateView.as_view( + template_name="manifest.json", content_type="application/json" + ), + ), # federation endpoints re_path(r"^inbox/?$", views.Inbox.as_view(), name="inbox"), re_path(rf"{LOCAL_USER_PATH}/inbox/?$", views.Inbox.as_view(), name="user_inbox"),