Warmcat homepage andy@warmcat.com
libwebsockets
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1745907529, "reponame":"cgit", "desc":"CGI gitweb", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/cgit", "f":3, "items": [ {"schema":"libjg2-1", "cid":"36e4a48aa1dc11714a0c1e70b727e587", "commit": {"type":"commit", "time": 1530589900, "time_ofs": 480, "oid_tree": { "oid": "61463d13d9d94597a4c75eecd12ad765b0d64360", "alias": []}, "oid":{ "oid": "b13d015ebe656ca7d345c23d3de234575a32ff31", "alias": []}, "msg": "desc: add root-desc-html and repo.desc-html", "sig_commit": { "git_time": { "time": 1530589900, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1530589900, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "desc: add root-desc-html and repo.desc-html\n\nThese are optional, default-empty raw html strings that\nare emitted after the corresponding text-only versions\nroot-desc and repo.desc when they are used in the header\narea.\n\nThis provides a flexible way to place buttons or links\nin the header region for both the repo index page and\nfor repos individually.\n\nThe existing root-desc and repo.desc keep their original\nmeaning as a shortish text-only repo description. The\nreason for that is the description is also used in places\nlike the repo list, where any decoration is not wanted.\n\nWhere root-desc and repo.desc are used in the header region, also\nemit their html counterparts afterwards if they are defined.\n\nWhere root-desc are repo.desc are used outside the header,\neg in the repo list, leave it as it is without adding any\nrelated html.\n\nIt's possible to not define the text repo.desc and just define\nthe repo.desc-html counterpart; only the html part is shown\nthen. But results in the repo list page will then vary according\nto what's in the html (text size, pictures etc).\n\nSigned-off-by: Andy Green \u003candy@warmcat.com\u003e\n" , "diff": "diff --git a/cgit.c b/cgit.c\nindex a4f79a4..2d42e04 100644\n--- a/cgit.c\n+++ b/cgit.c\n@@ -40,6 +40,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va\n \t\trepo-\u003eclone_url \u003d xstrdup(value);\n \telse if (!strcmp(name, \u0022desc\u0022))\n \t\trepo-\u003edesc \u003d xstrdup(value);\n+\telse if (!strcmp(name, \u0022desc-html\u0022))\n+\t\trepo-\u003edesc_html \u003d xstrdup(value);\n \telse if (!strcmp(name, \u0022owner\u0022))\n \t\trepo-\u003eowner \u003d xstrdup(value);\n \telse if (!strcmp(name, \u0022homepage\u0022))\n@@ -125,6 +127,8 @@ static void config_cb(const char *name, const char *value)\n \t\tctx.cfg.root_title \u003d xstrdup(value);\n \telse if (!strcmp(name, \u0022root-desc\u0022))\n \t\tctx.cfg.root_desc \u003d xstrdup(value);\n+\telse if (!strcmp(name, \u0022root-desc-html\u0022))\n+\t\tctx.cfg.root_desc_html \u003d xstrdup(value);\n \telse if (!strcmp(name, \u0022root-readme\u0022))\n \t\tctx.cfg.root_readme \u003d xstrdup(value);\n \telse if (!strcmp(name, \u0022css\u0022))\ndiff --git a/cgit.h b/cgit.h\nindex 85a6ef9..abb8515 100644\n--- a/cgit.h\n+++ b/cgit.h\n@@ -81,6 +81,7 @@ struct cgit_repo {\n \tchar *name;\n \tchar *path;\n \tchar *desc;\n+\tchar *desc_html;\n \tchar *owner;\n \tchar *homepage;\n \tchar *defbranch;\n@@ -206,6 +207,7 @@ struct cgit_config {\n \tchar *robots;\n \tchar *root_title;\n \tchar *root_desc;\n+\tchar *root_desc_html;\n \tchar *root_readme;\n \tchar *script_name;\n \tchar *section;\ndiff --git a/cgitrc.5.txt b/cgitrc.5.txt\nindex 784fda2..4aadc59 100644\n--- a/cgitrc.5.txt\n+++ b/cgitrc.5.txt\n@@ -357,6 +357,10 @@ root-desc::\n \tText printed below the heading on the repository index page. Default\n \tvalue: \u0022a fast webinterface for the git dscm\u0022.\n \n+root-desc-html::\n+\tOptional additional raw html to show in the header after root-desc.\n+\tDefault value: none.\n+\n root-readme::\n \tThe content of the file specified with this option will be included\n \tverbatim below the \u0022about\u0022 link on the repository index page. Default\n@@ -482,6 +486,14 @@ repo.defbranch::\n repo.desc::\n \tThe value to show as repository description. Default value: none.\n \n+repo.desc-html::\n+\tOptional additional raw html to show in the header after repo.desc.\n+\tDefault value: none. It's possible to leave repo.desc undefined,\n+\tand just define repo.desc-html. But it would mean the repo name\n+\tin the cgit repo list page will show the html parts. Depending on\n+\tthe html, it may be preferable to define repo.desc so the repo list\n+\tcan just use that and leave out the html.\n+\n repo.email-filter::\n \tOverride the default email-filter. Default value: none. See also:\n \t\u0022enable-filter-overrides\u0022. See also: \u0022FILTER API\u0022.\ndiff --git a/ui-shared.c b/ui-shared.c\nindex 7a8d323..df1736b 100644\n--- a/ui-shared.c\n+++ b/ui-shared.c\n@@ -996,12 +996,19 @@ static void print_header(void)\n \n \thtml(\u0022\u003ctr\u003e\u003ctd class\u003d'sub'\u003e\u0022);\n \tif (ctx.repo) {\n-\t\thtml_txt(ctx.repo-\u003edesc);\n+\t\tif (ctx.repo-\u003edesc \u0026\u0026\n+\t\t (ctx.repo-\u003edesc !\u003d cgit_default_repo_desc ||\n+\t\t !ctx.repo-\u003edesc_html))\n+\t\t\thtml_txt(ctx.repo-\u003edesc);\n+\t\tif (ctx.repo-\u003edesc_html)\n+\t\t\thtml(ctx.repo-\u003edesc_html);\n \t\thtml(\u0022\u003c/td\u003e\u003ctd class\u003d'sub right'\u003e\u0022);\n \t\thtml_txt(ctx.repo-\u003eowner);\n \t} else {\n \t\tif (ctx.cfg.root_desc)\n \t\t\thtml_txt(ctx.cfg.root_desc);\n+\t\tif (ctx.cfg.root_desc_html)\n+\t\t\thtml(ctx.cfg.root_desc_html);\n \t}\n \thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u005cn\u0022);\n }\n","s":{"c":1745907529,"u": 8760}} ],"g": 10689,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}