The files in markdown format are very popular these years, and the project documentation in GitHub is written in markdown format.
On the one hand, we can convert the markdown file to HTML through Pandoc, so that the HTML file can be explained by putting it on its own server. Install pandoc See my GitHub link.
On the one hand, Bootstrap is a better web front-end framework in recent years, so we want to convert markdown files to bootstrap-style HTML files. Already someone has done this module MARKDOWN2BOOTSTRAP.
1. Installing Nodejs and NPM
sudo apt-get install npmsudo apt-get install Nodejssudo ln-s/usr/bin/nodejs/usr/bin/node
The third line is to make a link, or you might encounter an error such as the following
/usr/bin/env:node:no such file or directory
2. Install Markdown2bootstrap to the current folder
NPM Install Markdown2bootstrap
If your computer is a proxy, you have to set up the NPM agent before using the above command, such as the following format
NPM Config set proxy=http://175.186.53.20:3128
3. Convert markdown to HTML command
Suppose you don't want to generate a list of numbers with-N parameters
./node_modules/.bin/markdown2bootstrap-n index.md
4. The final step is to copy the package to your site root folder, mine is ~/www
Cp-r Node_modules/markdown2bootstrap/bootstrap ~/www
This way your HTML files will be correctly explained on your website.
The interface style is as follows:
My OS is Ubuntu 14.04