List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] expand environmentvariables in root-title and root-descr
@ 2018-04-12  9:19 b.laessig
  2018-06-16 16:25 ` john
  0 siblings, 1 reply; 4+ messages in thread
From: b.laessig @ 2018-04-12  9:19 UTC (permalink / raw)


From: Bj?rn L?ssig <b.laessig at pengutronix.de>

For having personanlized cgit configuration i need to use

  root-desc=$REMOTE_USER@$HTTP_HOST
---
 cgit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cgit.c b/cgit.c
index bd9cb3f..1d7d67e 100644
--- a/cgit.c
+++ b/cgit.c
@@ -120,9 +120,9 @@ static void config_cb(const char *name, const char *value)
 	else if (!strcmp(name, "readme"))
 		string_list_append(&ctx.cfg.readme, xstrdup(value));
 	else if (!strcmp(name, "root-title"))
-		ctx.cfg.root_title = xstrdup(value);
+		ctx.cfg.root_title = xstrdup(expand_macros(value));
 	else if (!strcmp(name, "root-desc"))
-		ctx.cfg.root_desc = xstrdup(value);
+		ctx.cfg.root_desc = xstrdup(expand_macros(value));
 	else if (!strcmp(name, "root-readme"))
 		ctx.cfg.root_readme = xstrdup(value);
 	else if (!strcmp(name, "css"))
-- 
2.11.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-11 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12  9:19 [PATCH] expand environmentvariables in root-title and root-descr b.laessig
2018-06-16 16:25 ` john
2018-06-18  6:36   ` 
2022-07-11 14:57   ` Björn Lässig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).