MarkdownViewer

Markdown Viewer for GitHub

Preview GitHub Markdown — READMEs, wikis and comments — before you push.

285 chars

A small command-line utility that does one thing well.

Installation

npm install project-name

Usage

import { start } from 'project-name';
start();

Contributing

Pull requests are welcome. Open an issue first to discuss what you would like to change.

What is Markdown Viewer for GitHub?

GitHub renders Markdown with its own dialect, GitHub-flavoured Markdown (GFM), which adds tables, task lists, autolinks and strikethrough to the standard syntax. This viewer uses the same dialect, so you can check that a README, wiki page or issue comment will look right before you commit it. It is especially useful for catching broken tables, unclosed code fences and relative links that behave differently in a repository than in a plain text editor.

Common Uses for Markdown Viewer for GitHub

  • Previewing a README.md before committing and pushing
  • Checking a wiki page or documentation file for formatting errors
  • Drafting an issue or pull request description with tables
  • Reviewing Markdown that an AI assistant generated for your repo

Why READMEs Break After Pushing

Two problems show up constantly. First, a table with an uneven number of pipe characters simply fails to render, showing raw text instead of a grid. Second, an unclosed triple-backtick fence swallows the rest of the document into one code block. Both are invisible in a text editor and obvious in a rendered preview, which is exactly why checking before pushing saves a follow-up commit.

Relative Links Behave Differently in a Repo

A link like [docs](./docs/guide.md) works inside a GitHub repository because GitHub resolves it against the repository tree. In any other viewer it may not resolve at all. The rule of thumb: use relative paths for links within the repo, and absolute URLs for anything a reader might open outside it, including images and badges.

Frequently Asked Questions

Will the preview match GitHub exactly?
The structure will. This viewer implements GitHub-flavoured Markdown, so headings, tables, task lists, autolinks and fenced code blocks render the same way. Colours and fonts differ from GitHub's theme, but the layout and content match.
Do relative image and link paths work?
Relative paths resolve against the repository on GitHub, not against this viewer, so those images may not load here. Absolute URLs, including badge images from services like shields.io, load normally as long as they are reachable.
Does it support GitHub task lists?
Yes. Lines written as - [ ] and - [x] render as task list items with checkboxes, the same as they appear on GitHub.
Is my README sent to a server?
No. Rendering happens in your browser. Private repository content and unreleased documentation never leave your machine.

More Markdown Tools