commit 450e05fc733c850cd78d3112440bc793a7a29205
parent 311e024ba75e83908034edd5c9f070bfcbec478e
Author: Luke Willis <lukejw@monastech.xyz>
Date:   Mon,  9 Mar 2026 03:28:57 -0400

patches: Adjust stagit with some new hardcoded values

Diffstat:
Mmt/packages/patches/stagit.diff | 34++++++++++++++++++++++++++--------
Mmt/packages/version-control.scm | 1+
2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/mt/packages/patches/stagit.diff b/mt/packages/patches/stagit.diff @@ -1,23 +1,40 @@ diff --git a/stagit-index.c b/stagit-index.c -index 6402296..0f22737 100644 +index 6402296..0e90b16 100644 --- a/stagit-index.c +++ b/stagit-index.c -@@ -101,10 +101,10 @@ writeheader(FILE *fp) +@@ -12,7 +12,9 @@ static git_repository *repo; + + static const char *relpath = ""; + +-static char description[255] = "Repositories"; ++/* TODO: Take these as arguments instead of hardcoding them */ ++static char title[255] = "MonasTech Repositories"; ++static char description[255] = "Making technology in the world, not of the world."; + static char *name = ""; + static char owner[255]; + +@@ -100,12 +102,14 @@ writeheader(FILE *fp) + "<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)); +- xmlencode(fp, description, strlen(description)); - 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); ++ xmlencode(fp, title, strlen(title)); + fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"/logo.svg\" />\n", relpath); + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.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" -+ fprintf(fp, "<table>\n<tr><td><img src=\"/logo.svg\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" - "<td><span class=\"desc\">", relpath); +- "<td><span class=\"desc\">", relpath); ++ fprintf(fp, "<table id=\"header\">\n<tr><td><img src=\"/logo.svg\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" ++ "<td><h1>", relpath); ++ xmlencode(fp, title, strlen(title)); ++ fputs("</h1><span class=\"desc\">", fp); xmlencode(fp, description, strlen(description)); fputs("</span></td></tr><tr><td></td><td>\n" + "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n" diff --git a/stagit.c b/stagit.c -index 409714b..46f086b 100644 +index 409714b..7174246 100644 --- a/stagit.c +++ b/stagit.c @@ -511,16 +511,16 @@ writeheader(FILE *fp, const char *title) @@ -33,9 +50,10 @@ index 409714b..46f086b 100644 xmlencode(fp, name, strlen(name)); fprintf(fp, " Atom Feed (tags)\" href=\"%stags.xml\" />\n", relpath); - fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); -+ fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />\n", relpath); - fputs("</head>\n<body>\n<table><tr><td>", fp); +- fputs("</head>\n<body>\n<table><tr><td>", fp); - fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", ++ fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />\n", relpath); ++ fputs("</head>\n<body>\n<table id=\"header\"><tr><td>", fp); + fprintf(fp, "<a href=\"../%s\"><img src=\"/logo.svg\" alt=\"\" width=\"32\" height=\"32\" /></a>", relpath, relpath); fputs("</td><td><h1>", fp); diff --git a/mt/packages/version-control.scm b/mt/packages/version-control.scm @@ -6,6 +6,7 @@ (define-public stagit (package (inherit gnu:stagit) + (name "stagit-mt") (source (origin (inherit (package-source gnu:stagit)) (patches (list