stagit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b73416ba57f1b95688d9d4b1ba2a31de3680d3a7
parent 65650f65259122e2b9d6b81814791dc67cccdcd8
Author: Tanguy Andreani <tanguy.andreani@tuta.io>
Date:   Sun, 26 Jan 2020 04:57:47 +0100

custom title and description

- added a global constant named title
- both title and description aren't xmlencoded anymore

Diffstat:
Mstagit-index.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -17,7 +17,8 @@ static git_repository *repo; static const char *relpath = ""; -static char description[255] = "Repositories"; +static char description[255] = "Repositories - <a href=\"//weeb.soykaf.moe\">weeb.soykaf.moe</a>"; +static char title[255] = "Repositories"; static char *name = ""; static char owner[255]; @@ -72,13 +73,13 @@ writeheader(FILE *fp) "<html>\n<head>\n" "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" "<title>", fp); - xmlencode(fp, description, strlen(description)); + fputs(title, fp); fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); fputs("</head>\n<body>\n", fp); fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" "<td><span class=\"desc\">", relpath); - xmlencode(fp, description, strlen(description)); + fputs(description, fp); fputs("</span></td></tr><tr><td></td><td>\n" "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n" "<table id=\"index\"><thead>\n"