markdown: Markdown-to-html NGINX module
Debian/Ubuntu installation
These docs apply to the APT package nginx-module-markdown provided by the GetPageSpeed Extras repository.
- Configure the APT repository as described in APT repository setup.
- Install the module:
sudo apt-get update
sudo apt-get install nginx-module-markdown
Warning
This module is not yet published as nginx-module-markdown in the APT repositories. Stay tuned, or email [email protected] to request it.
ngx_markdown_filter_module
The ngx_markdown_filter_module module is a filter that transforms markdown files to html format.
This module utilizes the cmark library.
Example configuration
location ~ \.md {
markdown_filter on;
markdown_template html/template.html;
}
This works on proxy locations as well.
Directives
Syntax: markdown_filter on|off;
Context: location
Syntax: markdown_template html/template.html;
Context: location
# enable `unsafe` mode for cmark
Syntax: markdown_unsafe on|off;
Context: location;
## enable `tagfilter` extension for cmark-gfm
Syntax: markdown_gfm_tagfilter on|off;
Context: location;
## enable `tasklist` extension for cmark-gfm
Syntax: markdown_gfm_tasklist on|off;
Context: location;
## enable `strikethrough` extension for cmark-gfm
Syntax: markdown_gfm_strikethrough on|off;
Context: location;
## enable `autolink` extension for cmark-gfm
Syntax: markdown_gfm_autolink on|off;
Context: location;