项目作者: crisp-archive

项目描述 :
Nginx Markdown Module, convert .md file to .html with specific header and footer
高级语言: C
项目地址: git://github.com/crisp-archive/ngx_http_markdown_module.git
创建时间: 2014-03-06T13:31:21Z
项目社区:https://github.com/crisp-archive/ngx_http_markdown_module

开源协议:BSD 2-Clause "Simplified" License

下载


ngx_http_markdown_module

Introduction

ngx_http_markdown_module is a simple Nginx module, which serves local Markdown files, converting them to html, and make response with headers and footers.

Build

Prerequisites

  • pkg-config
  • awk
  • glib-2.0
  • peg-markdown

Build Prerequisites

Install glib-2.0

For macOS:

  1. $ brew install glib

For Ubuntu Linux:

  1. $ sudo apt-get update
  2. $ sudo apt-get install glib2.0

Build peg-markdown

  1. $ git submodule update --init --recursive
  2. $ cd peg-markdown
  3. $ make library

Build Nginx

  1. $ ./configure --add-module=/path/to/ngx_http_markdown_module
  2. $ make
  3. $ [sudo] make install

Configuration

ngx_http_markdown_module conf

  1. location /markdown {
  2. markdown on;
  3. markdown_html_header /path/to/header.html;
  4. markdown_html_footer /path/to/footer.html;
  5. }

License

  • BSD-2-Clause