From 567e8f34ec86483f16fe409ff0f15b6abc68c380 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Thu, 25 Nov 2021 08:17:20 -0500 Subject: [PATCH] Add forge and VCS meta tags See https://sr.ht/~ancarda/vcs-autodiscovery/ References: https://todo.sr.ht/~sircmpwn/git.sr.ht/163 --- gitsrht/templates/repo.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gitsrht/templates/repo.html b/gitsrht/templates/repo.html index 0db0f0c..847ae83 100644 --- a/gitsrht/templates/repo.html +++ b/gitsrht/templates/repo.html @@ -3,6 +3,22 @@ {% if repo.visibility.value =='unlisted' %} {% endif %} + +{% if default_branch %} +{% set default_branch_name = default_branch.raw_name.decode("utf-8", "replace")[len("refs/heads/"):] %} + +{% endif %} +{# NOTE: unauthorized clone URLs should be listed first #} +{% for clone_url in (repo | clone_urls) %} + +{% endfor %} +{% set project_root = root + url_for("repo.summary", owner=repo.owner.canonical_name, repo=repo.name) %} + + + + + + {# Man, this is lame #} -- 2.38.4