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.0.tar.gz (3.0 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.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: markdown_browse-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 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.0.tar.gz
Algorithm Hash digest
SHA256 3eb3acdf4b07915827cba7d8d860a99bec4b69df4bc5d5360bd7fc61ecb59f69
MD5 a1b016cd2cdca20c7c3786c7b364818b
BLAKE2b-256 ed1bb16f1e9b01d9744108f28633a502e69bcfa39538f3ddd337fcd816acb9ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: markdown_browse-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6026e52eb25b0ae52b00e7957ca4bddfe8d21af533903c7774e7fe366e7efc4
MD5 b005d0d785a1bdffa98eed1109aa7925
BLAKE2b-256 f695c45f4f8b13f183833de3df4eab51a8e94f5aea8c3b9f9749bc0bd0780a62

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