summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Unidiff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 749ea35..5ce2bc5 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -490,33 +490,34 @@ void cgit_print_docstart(struct cgit_context *ctx)
490 html("<head>\n"); 490 html("<head>\n");
491 html("<title>"); 491 html("<title>");
492 html_txt(ctx->page.title); 492 html_txt(ctx->page.title);
493 html("</title>\n"); 493 html("</title>\n");
494 htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version); 494 htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version);
495 if (ctx->cfg.robots && *ctx->cfg.robots) 495 if (ctx->cfg.robots && *ctx->cfg.robots)
496 htmlf("<meta name='robots' content='%s'/>\n", ctx->cfg.robots); 496 htmlf("<meta name='robots' content='%s'/>\n", ctx->cfg.robots);
497 html("<link rel='stylesheet' type='text/css' href='"); 497 html("<link rel='stylesheet' type='text/css' href='");
498 html_attr(ctx->cfg.css); 498 html_attr(ctx->cfg.css);
499 html("'/>\n"); 499 html("'/>\n");
500 if (ctx->cfg.favicon) { 500 if (ctx->cfg.favicon) {
501 html("<link rel='shortcut icon' href='"); 501 html("<link rel='shortcut icon' href='");
502 html_attr(ctx->cfg.favicon); 502 html_attr(ctx->cfg.favicon);
503 html("'/>\n"); 503 html("'/>\n");
504 } 504 }
505 if (host && ctx->repo) { 505 if (host && ctx->repo) {
506 html("<link rel='alternate' title='Atom feed' href='http://"); 506 html("<link rel='alternate' title='Atom feed' href='");
507 html(cgit_httpscheme());
507 html_attr(cgit_hosturl()); 508 html_attr(cgit_hosturl());
508 html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path, 509 html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.path,
509 fmt("h=%s", ctx->qry.head))); 510 fmt("h=%s", ctx->qry.head)));
510 html("' type='application/atom+xml'/>"); 511 html("' type='application/atom+xml'/>");
511 } 512 }
512 html("</head>\n"); 513 html("</head>\n");
513 html("<body>\n"); 514 html("<body>\n");
514 if (ctx->cfg.header) 515 if (ctx->cfg.header)
515 html_include(ctx->cfg.header); 516 html_include(ctx->cfg.header);
516} 517}
517 518
518void cgit_print_docend() 519void cgit_print_docend()
519{ 520{
520 html("</div>"); 521 html("</div>");
521 if (ctx.cfg.footer) 522 if (ctx.cfg.footer)
522 html_include(ctx.cfg.footer); 523 html_include(ctx.cfg.footer);