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/bootstrap/blob/master/README.md
gitweb is written in perl script, and there is plugin for markdown in perl already.
I want to check whether there is plugin/solution to let gitweb automatically show html files for markdown format.
I use following post-receive hook in my remote repositories which are made browsable with gitweb.
That script is run when I push commits from my local work repositories to the remote bare ones. You could use that or something similar depending on your workflow/setup.
More information about git hooks: http://book.git-scm.com/5_git_hooks.html
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 requiredmarkdown
executable.Here are the modifications as a
diff
patch:I use this tampermonkey script in chrome to render README.md files as html, directly in gitweb: https://gist.github.com/nemoo/ee47cd9ad2a5b4fffffdfa Works nicely even if you do not have access to the gitweb server.
Here's something you can stick somewhere under
sub git_summary
in yourgitweb.perl
orgitweb.cgi
. Note that it depends on an externalmarkdown
executable.I don't really know Perl, so this is a dirty hack more than anything else, but it works.