fix(embed): Make sure embed has sane default image and correct link
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2650>
This commit is contained in:
parent
76362b020e
commit
69876867d5
|
@ -196,9 +196,7 @@ request errors related to this.
|
||||||
FUNKWHALE_SPA_HTML_CACHE_DURATION = env.int(
|
FUNKWHALE_SPA_HTML_CACHE_DURATION = env.int(
|
||||||
"FUNKWHALE_SPA_HTML_CACHE_DURATION", default=60 * 15
|
"FUNKWHALE_SPA_HTML_CACHE_DURATION", default=60 * 15
|
||||||
)
|
)
|
||||||
FUNKWHALE_EMBED_URL = env(
|
FUNKWHALE_EMBED_URL = env("FUNKWHALE_EMBED_URL", default=FUNKWHALE_URL + "/embed.html")
|
||||||
"FUNKWHALE_EMBED_URL", default=FUNKWHALE_URL + "/front/embed.html"
|
|
||||||
)
|
|
||||||
FUNKWHALE_SPA_REWRITE_MANIFEST = env.bool(
|
FUNKWHALE_SPA_REWRITE_MANIFEST = env.bool(
|
||||||
"FUNKWHALE_SPA_REWRITE_MANIFEST", default=True
|
"FUNKWHALE_SPA_REWRITE_MANIFEST", default=True
|
||||||
)
|
)
|
||||||
|
|
|
@ -150,7 +150,9 @@ def get_default_head_tags(path):
|
||||||
{
|
{
|
||||||
"tag": "meta",
|
"tag": "meta",
|
||||||
"property": "og:image",
|
"property": "og:image",
|
||||||
"content": utils.join_url(settings.FUNKWHALE_URL, "/front/favicon.png"),
|
"content": utils.join_url(
|
||||||
|
settings.FUNKWHALE_URL, "/android-chrome-512x512.png"
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tag": "meta",
|
"tag": "meta",
|
||||||
|
|
|
@ -108,7 +108,7 @@ def test_get_default_head_tags(preferences, settings):
|
||||||
{
|
{
|
||||||
"tag": "meta",
|
"tag": "meta",
|
||||||
"property": "og:image",
|
"property": "og:image",
|
||||||
"content": settings.FUNKWHALE_URL + "/front/favicon.png",
|
"content": settings.FUNKWHALE_URL + "/android-chrome-512x512.png",
|
||||||
},
|
},
|
||||||
{"tag": "meta", "property": "og:url", "content": settings.FUNKWHALE_URL + "/"},
|
{"tag": "meta", "property": "og:url", "content": settings.FUNKWHALE_URL + "/"},
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Make sure meta tags link to embedded player correctly
|
Loading…
Reference in New Issue