Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown Renderer

A lightweight tool that parses Markdown files into HTML and serves them locally using a built-in HTTP server.

Features

  • Markdown Parsing: Powered by cmark for reliable CommonMark compliance.
  • Local Rendering: Hosts the rendered HTML directly through a built-in HTTP server so you can view files in your browser.

Getting Started

Prerequisites

  • GCC or any standard C compiler
  • Make build system
  • cmark development libraries installed on your system.

Installation & Compilation

  1. Clone the repository:

    git clone https://github.com/r1shavd/md-renderer.git
    cd md-renderer
  2. Build the project:

    make
    
     # Or, use this to compile with mongoose version
    make mongoose

Usage

To start the built-in HTTP server and render your Markdown file, run the following command:

./bin/md-renderer <markdown-file.md> --ip-address <host-address> --port <port>

Example:

./bin/md-renderer README.md --port 8000

Once running, open your web browser and navigate to http://127.0.0.1:8000 to view your rendered document.

Use the --help flag for additional configuration options:

./bin/md-renderer --help

Dependencies

  • common-mark/cmark — Required for parsing Markdown files to HTML.
  • cesanta/mongoose - Required for hosting the parsed markdown files. Use the make mongoose version to compile this version. Other versions, reduce this dependencies sacrifising stability to use native SOCKET HTTP server.

About

A markdown renderer made in C using support of libs from common-mark/cmark and mongoose (presently replaced by native sockets HTTP server)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages