Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kjdev/mmhd

micro http server for makdown
https://github.com/kjdev/mmhd

Last synced: 25 days ago
JSON representation

micro http server for makdown

Awesome Lists containing this project

README

        

# mmhd: micro http server for makdown

micro http server for makdown

## Dependencies

libmicrohttpd library.

* [libmicrohttpd](http://www.gnu.org/software/libmicrohttpd)

hoedown library.

* [hoedown](https://github.com/kjdev/hoedown)

## Build

required.

* [cmake](http://www.cmake.org)
* [libmicrohttpd](http://www.gnu.org/software/libmicrohttpd)

```
% cmake .
% make
% make install
```

## Application

command | description
------- | -----------
mmhd | micro http server for markdown

### Application options

option | description | default
------ | ----------- | -------
-p, --port | server bind port | 8888
-r, --rootdir | document root directory | .
-d, --directory | directory index file name | index.md
-s, --style | style file |
-D, --daemonize | daemon command |
-P, --pidfile | daemon pid file path | /tmp/mmhd.pid

## Run

default bind port is 8888 and document root directory is '.'.

```
% mmhd [-p 8888] [-r .]
```

client access.

```
% curl http://localhost:8888/test.md
```

`.md`, `.markdown` file is converted.

### Run options

set document root directory (/path/to/name).

```
% mmhd -r /path/to/name
```

set directory index (index.html).

```
% mmhd -d index.html
```

set style file (/path/to/style.html).

```
% mmhd -s /path/to/style.html
```

/path/to/style.html:

```

Markdown

```

output after being converted into html from markdown in front of `