Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mdrenderer/mdrenderer.github.com

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 

Repository files navigation

GitHub & BitBucket HTML & Markdown Preview

Many GitHub repositories don't use GitHub Pages to host their HTML files. GitHub & BitBucket HTML & Markdown Preview allows you to render those files without cloning or downloading whole repositories. It is a client-side solution using a CORS proxy to fetch assets.

If you try to open raw version of any HTML, CSS or JS file in a web browser directly from GitHub, all you will see is a source code. GitHub forces them to use the "text/plain" content-type, so they cannot be interpreted. This script overrides it by using a CORS proxy.

Features

  • HTML preview — renders .html files with their referenced CSS, JS, frames and images proxied through CORS.
  • Markdown rendering.md files are rendered with marked and styled with github-markdown-css to look like GitHub, with automatic light/dark mode.
  • Collapsible table of contents — when a Markdown file has 3+ headings, a sticky sidebar outline is generated with tocbot, with smooth scrolling and active-section highlighting. Toggle it from the ☰ button.
  • Cross-file navigation — links between hosted HTML/Markdown files are rewritten to load through the preview, and same-file anchors keep working.

Usage

In order to use it, just prepend this fragment to the URL of any HTML or Markdown file: https://mdrenderer.github.io/? e.g.:

What it does is: load the file using a CORS proxy, then either process all links, frames, scripts and styles for HTML, or parse Markdown to HTML and inject the GitHub stylesheet and outline sidebar.

GitHub & BitBucket HTML & Markdown Preview was tested under the latest Google Chrome and Mozilla Firefox.

License

© 2019 Jerzy Głowacki, © 2026 Andreas Kirsch / Claude Code, under Apache License 2.0.

About

MD Preview for GitHub Repositories

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 83.6%
  • HTML 16.4%