diff --git a/stagit.c b/stagit.c
@@ -453,15 +453,27 @@ void writeheader(FILE *fp, const char *title)
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n"
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>\n"
"<title>", fp);
- xmlencode(fp, description, strlen(description));
- fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/svg\" href=\"/icons/favicon.svg\" />\n");
- fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"/styles.css\" />\n", relpath);
+ xmlencode(fp, strippedname, strlen(strippedname));
+ fprintf(fp, " — ");
+ xmlencode(fp, title, strlen(title));
+ fprintf(fp,
+ "</title>\n"
+ "<link rel=\"icon\" "
+ "type=\"image/svg\" "
+ "href=\"/icons/favicon.svg\" />\n");
+ fprintf(fp,
+ "<link rel=\"stylesheet\" "
+ "type=\"text/css\" "
+ "href=\"/styles.css\" />\n",
+ relpath);
fputs("</head>\n<body>\n", fp);
// The navigation bar
fputs("<nav>\n"
"<a href=\"https://git.pablopie.xyz\">\n"
- "<img aria-hidden=\"true\" alt=\"Website logo\" src=\"/icons/favicon.svg\">\n"
+ "<img aria-hidden=\"true\" "
+ "alt=\"Website logo\" "
+ "src=\"/icons/favicon.svg\">\n"
"git.pablopie.xyz\n"
"</a>\n"
"</nav>\n", fp);