gitsrht/templates: Drop /item/ from forge meta tags
Links with /item/ result in 404s for the root directory. Remove /item/ so that links to the root directory work properly. For example, this link on godocs.io is broken: https://godocs.io/git.sr.ht/~sircmpwn/getopt#pkg-files
This commit is contained in:
parent
5e5b7b77f0
commit
e520aa8a73
|
@ -18,10 +18,10 @@
|
|||
{# Forge meta tags #}
|
||||
{% set project_root = root + url_for("repo.summary", owner=repo.owner.canonical_name, repo=repo.name) %}
|
||||
<meta name="forge:summary" content="{{project_root}}">
|
||||
<meta name="forge:dir" content="{{project_root}}/tree/{ref}/item/{path}">
|
||||
<meta name="forge:file" content="{{project_root}}/tree/{ref}/item/{path}">
|
||||
<meta name="forge:dir" content="{{project_root}}/tree/{ref}/{path}">
|
||||
<meta name="forge:file" content="{{project_root}}/tree/{ref}/{path}">
|
||||
<meta name="forge:rawfile" content="{{project_root}}/blob/{ref}/{path}">
|
||||
<meta name="forge:line" content="{{project_root}}/tree/{ref}/item/{path}#L{line}">
|
||||
<meta name="forge:line" content="{{project_root}}/tree/{ref}/{path}#L{line}">
|
||||
{# Go meta tags #}
|
||||
<meta name="go-import" content="{{domain}}/{{owner.canonical_name}}/{{repo.name}} git {{(repo | clone_urls)[0]}}">
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue