[PATCH 7/8] add <link rel='self'> to atom feed

zwinkau at kit.edu zwinkau at kit.edu
Tue Jul 1 09:40:32 CEST 2014


From: Matthias Braun <matze at braunis.de>

FEED Validator recommends it.
---
 ui-atom.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ui-atom.c b/ui-atom.c
index 4d9ba00..6da3e36 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -150,6 +150,17 @@ void cgit_print_atom(char *tip, char *path, int max_count, int enable_atom_diff)
 		html_attr(cgit_repourl(ctx.repo->url));
 		html("'/>\n");
 
+		html("<link rel='self' type='application/atom+xml' href='");
+		html(cgit_httpscheme());
+		html_attr(host);
+		html_attr(cgit_repourl(ctx.repo->url));
+		html("atom");
+		if (tip) {
+			html("/?h=");
+			html_txt(tip);
+		}
+		html("'/>\n");
+
 		html("<id>");
 		html(cgit_httpscheme());
 		html_txt(host);
-- 
1.9.1



More information about the CGit mailing list