Skip to main content

A simple Flask app to render Markdown files with Mermaid support

Project description

Markdown Viewer

A simple Flask app to render Markdown files with Mermaid support. It allows browsing and viewing .md files in a directory, with support for relative links between Markdown files and proper image rendering.

Features

  • Lists all .md files in the specified directory
  • Renders Markdown with GitHub-style extensions (fenced code, tables, code highlighting, TOC)
  • Mermaid diagram support with client-side rendering
  • Follows relative links to other .md files
  • Provides back links when navigating between files
  • Serves images and other assets correctly
  • Configurable port and folder via command-line arguments
  • Installable via PyPI

Installation

From PyPI (once published)

pip install markdown-viewer

From Source

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
    

Usage

As a Script (after PyPI installation)

markdown-viewer --port 8080 --folder /path/to/markdown/files

From Source

python app.py --port 8080 --folder /path/to/markdown/files

Options

  • --port PORT: Port to run the server on (default: 5000)
  • --folder FOLDER: Folder to serve Markdown files from (default: current directory)

Examples

Run on default port 5000, current directory:

markdown-viewer

Run on port 3000, specific folder:

markdown-viewer --port 3000 --folder ./docs

Then visit http://127.0.0.1:PORT/ in your browser.

Publishing to PyPI

This project uses Hatch for packaging. To build and publish:

  1. Install Hatch: pip install hatch
  2. Build: hatch build
  3. Publish: hatch publish (requires PyPI credentials)

Dependencies

  • Flask: Web framework
  • Markdown: Markdown parsing
  • pymdown-extensions: Additional Markdown extensions including Mermaid support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown_browse-0.1.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markdown_browse-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file markdown_browse-0.1.1.tar.gz.

File metadata

  • Download URL: markdown_browse-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.7 HTTPX/0.28.1

File hashes

Hashes for markdown_browse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 06ef1cac4fc99e1dbf119300baeb1b83755d0e045846820a574d62a9ce303257
MD5 1cfd8e5a927017db57b23e1881a9d820
BLAKE2b-256 c750cd6fee91a801bf6b82d77eb5df4b6218da0d2e216a59b94045a605405554

See more details on using hashes here.

File details

Details for the file markdown_browse-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: markdown_browse-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.7 HTTPX/0.28.1

File hashes

Hashes for markdown_browse-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b24c8f4f43fd5d56fc8560079c75f6f438fa064d80d09e0f7d54dc89830e3d6
MD5 5daf5a3c716e9ed04fbcc3616143245a
BLAKE2b-256 a4ba32c712925577a87788b808ab1a2cf237b59e91faf7587460d6adec9e128a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page