Skip to content

About

Drag and read. MDLite turns any .md file into a clean, navigable page with a live table of contents - instant and local.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

MDLite — Ultralight Markdown Viewer for Chrome

Drag and read. MDLite renders any .md file — local or on the web — into a clean, readable page with a live table of contents, right in Chrome. No server, no account, no setup.

MDLite screenshot

Features

  • Instant rendering — open a .md file and get a formatted page instead of a wall of raw text
  • Auto-generated table of contents, built from your headings, nested and collapsible
  • Adjustable reading experience — font size (A- / A+) and content width (W- / W+), with one-click reset (R)
  • Resizable, collapsible sidebar — drag the edge to resize, or collapse it entirely
  • One-click on/off via the toolbar icon — when off, the icon turns gray with an "OFF" badge and the page falls back to the raw file
  • Remembers your preferences — font size, width, and on/off state persist across sessions
  • Graceful fallback — documents with no headings (plain text, a bare table) still show the toolbar; the TOC panel just reads "No headings found"
  • Fully local — no network requests of its own, nothing leaves your browser

Supported URLs

Pattern Example
file:///*.md, file:///*.markdown Local files opened directly in Chrome
http://*/*.md, https://*/*.md Raw Markdown served over the web (e.g. GitHub raw links)

Installation

From source (developer mode)

  1. Clone this repository
  2. Open chrome://extensions in Chrome
  3. Enable Developer mode (top right)
  4. Click Load unpacked and select the project folder
  5. Open any local .md file, or navigate to a raw .md URL

Usage

Click the toolbar icon to toggle rendering on/off for all open .md tabs. When it's off, the icon grays out and shows an "OFF" badge, and pages fall back to their raw, unstyled text.

Sidebar controls:

Control Action
R Reset font size and width to defaults
A- / A+ Decrease / increase font size (70%–200%)
W- / W+ Decrease / increase content width (600px–1400px)
« / » Collapse / expand the TOC sidebar
Drag right edge Resize the sidebar (300px–560px)

Click any entry in the table of contents to jump to that heading; click it again to collapse its subheadings.

How it works

  • background.js — tracks the enabled/disabled state, updates the toolbar badge (gray "OFF" when disabled), and broadcasts toggle events to matching open tabs
  • content.js — detects raw .md pages, renders them with marked, builds the table of contents from the rendered headings, and wires up the sidebar controls
  • chrome.storage.local — persists font scale, content width, and the on/off preference between sessions

Project structure

.
├── manifest.json
├── background.js
├── content.js
├── style.css
├── vendor/
│   └── marked.min.js
└── icons/
    ├── icon16.png
    ├── icon48.png
    └── icon128.png

Permissions

Permission Why it's needed
storage Save font size, content width, and on/off preference locally
tabs Find open .md tabs to broadcast on/off toggles to
Host permissions Scoped only to .md / .markdown URLs (file://, http://, https://)

Contributing

Issues and pull requests are welcome — please open an issue first for larger changes so we can discuss the approach.

License

No license has been set for this project yet. Add a LICENSE file to specify how others may use, modify, or distribute this code.

About

Drag and read. MDLite turns any .md file into a clean, navigable page with a live table of contents - instant and local.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages