/* cgit.c: cgi for the git scm
*
- * Copyright (C) 2006-2014 cgit Development Team <cgit@lists.zx2c4.com>
+ * Copyright (C) 2006-2018 cgit Development Team <cgit@lists.zx2c4.com>
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
add_mimetype(name + 9, value);
else if (starts_with(name, "render."))
add_render_filter(name + 7, value);
+ else if (!strcmp(name, "inline-readme"))
+ string_list_insert(&ctx.cfg.inline_readme, value);
else if (!strcmp(name, "include"))
parse_configfile(expand_macros(value), config_cb);
}
ctx.page.etag = NULL;
string_list_init(&ctx.cfg.mimetypes, 1);
string_list_init(&ctx.cfg.render_filters, 1);
+ string_list_init(&ctx.cfg.inline_readme, 1);
if (ctx.env.script_name)
ctx.cfg.script_name = xstrdup(ctx.env.script_name);
if (ctx.env.query_string)
int branch_sort;
int commit_sort;
struct string_list mimetypes;
+ struct string_list inline_readme;
struct string_list render_filters;
struct cgit_filter *about_filter;
struct cgit_filter *commit_filter;
Name of a configfile to include before the rest of the current config-
file is parsed. Default value: none. See also: "MACRO EXPANSION".
+inline-readme::
+ Append given filename to the list of filenames to be rendered after the
+ tree navigation in tree view, if present in the directory being viewed. Eg,
+ 'inline-readme=README.md'. You may also want a corresponding render.
+ entry for the readme suffix, eg,
+ 'render.md=/usr/libexec/cgit/filters/html-converters/md2html'. Repos will
+ use the list defined with 'inline-readme' by default, however they can
+ individually also choose to ignore this global list, and create a
+ repo-specific list by using 'repo.inline-readme'.
+
local-time::
Flag which, if set to "1", makes cgit print commit and tag times in the
servers timezone. Default value: "0".