decentralized and customizable links page on top of atproto

canonical profile url & login nofollow

Changed files
+15 -3
src
+9 -1
src/main.py
··· 63 63 if did is None: 64 64 return render_template("error.html", message="did not found"), 404 65 65 elif is_valid_did(atid): 66 + handle = None 66 67 did = atid 67 68 else: 68 69 return render_template("error.html", message="invalid did or handle"), 400 ··· 85 86 return redirect(request.path) 86 87 87 88 athref = f"at://{did}/at.ligo.actor.links/self" 88 - return render_template("profile.html", profile=profile, links=links, athref=athref) 89 + canonical = f"https://ligo.at/{f'@{handle}' if handle else did}" 90 + return render_template( 91 + "profile.html", 92 + profile=profile, 93 + links=links, 94 + canonical=canonical, 95 + athref=athref, 96 + ) 89 97 90 98 91 99 @app.get("/login")
+4 -1
src/templates/login.html
··· 24 24 </label> 25 25 <span class="faded caption"> 26 26 Use your AT Protocol handle to log in. 27 - If you're unsure you can <a href="{{ url_for('oauth.oauth_start', authserver='https://bsky.social') }}">log in with Bluesky</a>. 27 + If you're unsure you can 28 + <a href="{{ url_for('oauth.oauth_start', authserver='https://bsky.social') }}" rel="nofollow"> 29 + log in with Bluesky 30 + </a>. 28 31 </span> 29 32 <input type="submit" value="continue" /> 30 33 </form>
+2 -1
src/templates/profile.html
··· 10 10 <link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='favicon-16.png') }}" /> 11 11 <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='favicon-32.png') }}" /> 12 12 <link rel="icon" type="image/png" sizes="48x48" href="{{ url_for('static', filename='favicon-48.png') }}" /> 13 - <link rel="alternate" href="{{ athref }}" /> 13 + {% if canonical %}<link rel="canonical" href="{{ canonical }}" />{% endif %} 14 + {% if athref %}<link rel="alternate" href="{{ athref }}" />{% endif %} 14 15 </head> 15 16 <body> 16 17 <div class="wrapper profile">