Here you can put somewhere under sub git_summary in gitweb.perl or gitweb.cgi . Note that this depends on the external markdown .
if (!$prevent_xss) { $file_name = "README.md"; my $proj_head_hash = git_get_head_hash($project); my $readme_blob_hash = git_get_hash_by_path($proj_head_hash, "README.md", "blob"); if ($readme_blob_hash) { # if README.md exists print "<div class=\"header\">readme</div>\n"; print "<div class=\"readme page_body\">"; # TODO find/create a better CSS class than page_body my $cmd_markdownify = $GIT . " " . git_cmd() . " cat-file blob " . $readme_blob_hash . " | markdown |"; open FOO, $cmd_markdownify or die_error(500, "Open git-cat-file blob '$hash' failed"); while (<FOO>) { print $_; } close(FOO); print "</div>"; } }
I really don't know Perl, so it's a dirty hack more than anything else, but it works.
eriksensei
source share