~gitpocket/gitpocket

8

feat(web): advertise feeds in the page head

commit
a2cd34fef6d9f8ae1d404838dbafc4772ff59715 browse tree
parent
939080f518ead0a48735db3f08282687e974a00e
author
~james <[email protected]>
signature
Signed by: ~james SHA256:KlzJ0P0gvJcnOYpaxD5yCUw52ImHttTKRjVAEnnYnKg
date
2026-10-15 22:30 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>