Markdown is important for documentation, it is very nice to see README.md
can be automatically show in html format in github like https://github.com/twitter/bootstr
Here are my modifications to gitweb.cgi
based on the accepted answer, so that:
README.md
in the project root is displayed (as in accepted answer)*.md
file is displayed if it is chosen as file from the tree view(my parent)[../parent.md]
would refer correctly); should work for images as wellNote that I'm using sudo apt-get install libtext-markdown-perl
on Ubuntu to provide the required markdown
executable.
Here are the modifications as a diff
patch:
--- /usr/share/gitweb/gitweb.cgi.orig 2016-04-13 10:28:03.268872899 +0200
+++ /usr/share/gitweb/gitweb.cgi 2016-04-13 10:39:02.344875516 +0200
@@ -16,8 +16,9 @@
use Encode;
use Fcntl ':mode';
use File::Find qw();
-use File::Basename qw(basename);
+use File::Basename qw(basename dirname);
use Time::HiRes qw(gettimeofday tv_interval);
+use File::Spec; # hack
binmode STDOUT, ':utf8';
our $t0 = [ gettimeofday() ];
@@ -6585,6 +6586,20 @@
print "\n