Ⅰ. 插件描述
Small instant Markdown preview serverⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'suan/extra-instant-markdown'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'suan/extra-instant-markdown'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'suan/extra-instant-markdown'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/suan/instant-markdown-d
Ⅳ. 文档说明
!nstant-markdown-d
instant-markdown-d is a small Node.js server that enables instant compilation and previewing of Markup files. A plugin can easily be written for any text editor to interface with it. One currently exists for VIm: https://github.com/suan/vim-instant-markdown
Installation
Install the mini-server by running either:
[sudo] npm -g install instant-markdown-d
or pre-release version
[sudo] npm -g install instant-markdown-d@next
see vim-instant-markdown for
Vim / Neovim integration.
REST API
Action | HTTP Method | Request URL | Request Body |
---|---|---|---|
Refresh Markdown on page | PUT | http://localhost:<port> | <New Markdown file contents> |
Close Webpage | DELETE | http://localhost:<port> |
By default, <port>
is 8090
Environment variables
INSTANT_MARKDOWN_OPEN_TO_THE_WORLD=1
- by default, the server only listens
on localhost. To make the server available to others in your network, set this
environment variable to a non-empty value. Only use this setting on trusted
networks!
INSTANT_MARKDOWN_ALLOW_UNSAFE_CONTENT=1
- by default, scripts are blocked.
Use this preference to allow scripts.INSTANT_MARKDOWN_BLOCK_EXTERNAL=1
- by default, external resources such as
images, stylesheets, frames and plugins are allowed. Use this setting to
block such external content.
INSTANT_MARKDOWN_MATHJAX_FONTS="/usr/share/mathjax/fonts/HTML-CSS/"
- to
serve fonts for Mathjax from a local directory.