From 1b7c0778f94de667d002f803fdb1fcc64b2efd23 Mon Sep 17 00:00:00 2001 From: Mario Nachbaur Date: Mon, 27 Oct 2025 13:42:46 +0100 Subject: [PATCH] profile metadata and open graph --- src/main.py | 3 +-- src/templates/profile.html | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 0ced9be..c72f9b7 100644 --- a/src/main.py +++ b/src/main.py @@ -85,13 +85,12 @@ async def page_profile(atid: str): # remove the ?reload parameter return redirect(request.path) + profile["handle"] = handle athref = f"at://{did}/at.ligo.actor.links/self" - canonical = f"https://ligo.at/{f'@{handle}' if handle else did}" return render_template( "profile.html", profile=profile, links=links, - canonical=canonical, athref=athref, ) diff --git a/src/templates/profile.html b/src/templates/profile.html index 15c5825..00f5833 100644 --- a/src/templates/profile.html +++ b/src/templates/profile.html @@ -2,7 +2,22 @@ + + Links for {{ profile.displayName }} + + {% if profile.description %} + + + {% endif %} + + {% if profile.handle %} + + + + {% endif %} + {% if athref %}{% endif %} + @@ -10,8 +25,6 @@ - {% if canonical %}{% endif %} - {% if athref %}{% endif %}
-- 2.51.2