mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 16:40:36 +00:00
Add: installable as PWA
This commit is contained in:
parent
a09b2ab45c
commit
b9851d665e
4 changed files with 20 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
<base target="_blank">
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{% if site.favicon %}{% get_media_prefix %}{{ site.favicon }}{% else %}{% static "images/favicon.ico" %}{% endif %}">
|
||||
<link rel="apple-touch-icon" href="{% if site.logo %}{{ media_full_url }}{{ site.logo }}{% else %}{% static "images/logo.png" %}{% endif %}">
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
{% block opengraph %}
|
||||
{% include 'snippets/opengraph.html' %}
|
||||
|
|
14
bookwyrm/templates/manifest.json
Normal file
14
bookwyrm/templates/manifest.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{% load static %}
|
||||
{
|
||||
"name": "Bookwyrm",
|
||||
"description": "Social network for tracking your reading",
|
||||
"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"
|
||||
}
|
|
@ -33,6 +33,10 @@ 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"),
|
||||
|
|
Loading…
Reference in a new issue