Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:02:31+00:00 2026-06-12T12:02:31+00:00

Markdown is important for documentation, it is very nice to see README.md can be

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:02:32+00:00Added an answer on June 12, 2026 at 12:02 pm

    Here’s something you can stick somewhere under sub git_summary in your gitweb.perl or gitweb.cgi. Note that it depends on an external markdown executable.

    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 don’t really know Perl, so this is a dirty hack more than anything else, but it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python-Markdown includes features like escaping of raw HTML that are obviously intended to make
I'm using CKEditor in Markdown format to submit user created content. I would like
How can I convert markdown into html in .NET? var markdown = Some **bold**
I was reading http://github.github.com/github-flavored-markdown/ I would like to implement that Newline modification in PHP
Markdown is a great tool for formatting plain text into pretty html, but it
I like to use markdown notation in my subversion commit messages, planning to one
I have a markdown helper that looks like this in application_helper.rb . How would
So I'm using Markdown to format text input from user: http://michelf.com/projects/php-markdown/ But I'm doing
I'm using markdown a lot and would like to have a few pages that
If I have markdown like this: # A Header ``` javascript $(document).ready(function() {}) ```

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.