~gitpocket/gitpocket

1

feat(web): advertise feeds in the page head

commit
b90d94929f3867d85bce0b21f4172d1daedc0276 browse tree
parent
7878eb07810d28b430c427d68d785cbebfc45519
author
obscurejames <354576047+obscurejames@users.noreply.github.com>
signature
Signed by: ~james SHA256:KlzJ0P0gvJcnOYpaxD5yCUw52ImHttTKRjVAEnnYnKg
date
2026-10-06 18:33 UTC

1 files changed, +3 −0

templates/layout.html modified

@@ -6,6 +6,9 @@
66 <title>{{.Title}}</title>
77 <link rel="stylesheet" href="/static/style.css?v={{.Version}}">
88 <link rel="stylesheet" href="/static/highlight.css?v={{.Version}}">
9+{{with .Data}}{{with index . "Page"}}<link rel="alternate" type="application/atom+xml" title="{{.Repo.Path}} commits" href="/{{.Repo.Path}}/feed">
10+<link rel="alternate" type="application/atom+xml" title="{{.Repo.Path}} issues" href="/{{.Repo.Path}}/issues/feed">
11+<link rel="alternate" type="application/atom+xml" title="{{.Repo.Path}} pull requests" href="/{{.Repo.Path}}/pulls/feed">{{end}}{{if index . "Profile"}}{{with index . "Owner"}}<link rel="alternate" type="application/atom+xml" title="~{{.Name}} commits" href="/~{{.Name}}/feed">{{end}}{{end}}{{end}}
912 {{if .Math}}<link rel="stylesheet" href="/static/katex/katex.min.css">
1013 <script defer src="/static/katex/katex.min.js"></script>
1114 <script defer src="/static/katex/auto-render.min.js"></script>