Search code examples
githubmarkdownviewer

View markdown files offline


Is there a way to display .md files offline so we know what it will look like once it's uploaded in Github? I'm referring to showing the README.md file as it would come out in Github, and not as for editing purposes.

Needs to work on Mac and Windows since I use both.


Solution

  • I wrote Grip a while ago to do exactly this. It renders exactly like it does on GitHub and provides several additional options too:

    • In addition to READMEs, Grip can renders GitHub comments and issues
    • Click through local links to render other .md files
    • An API to use in your own projects
    • Export to an HTML file

    Install with pip:

    pip install grip
    

    Then go to the directory that contains your README file and run:

    grip
    

    Pass -h for additional help and options.

    Here's a screenshot of Grip rendering Grip's README:

    Screenshot of Grip rendering Grip

    Check it out here.