livemarkdown-rs
A Rust application that watches markdown files for changes and renders them as HTML, served via a local HTTP server with real-time updates.
Features
- Watch markdown files for changes and auto-reload
- Live preview with real-time updates via Server-Sent Events (SSE)
- GitHub-flavored markdown rendering with source position mapping
- Multiple document management
- Light and dark mode support
- Browser integration for opening documents
Installation
Clone the repository and build the project:
Usage
Basic Usage
Start the server on default port with a markdown file:
Command Line Options
--port <PORT>- Specify the port to run the server on[FILE]- Optional path to a markdown file to watch at startup
API Endpoints
GET /- List all watched documentsGET /document/:id- View rendered markdown documentGET /document/:id/updates- SSE endpoint for real-time updatesPOST /api/document- Create a new watched documentDELETE /api/document/:id- Remove a watched documentPOST /api/document/:id/open- Open document in browserPOST /api/document/:id/position- Update document position
Example API Usage
Create a new document to watch:
Development
Building and Running
Testing and Quality
Dependencies Management
License
This project is in early development stage.