在线编写Markdown
装置Nginx服务
apt install nginxyum install nginx
批改Nginx配置
[email protected]:~# vim /etc/nginx/sites-available/default[email protected]:~# cat /etc/nginx/sites-available/defaultserver { listen 80; listen [::]:80; server_name md.oiox.cn; listen 443 ssl; listen [::]:443; ssl_certificate /ssl/cert.pem; ssl_certificate_key /ssl/cert.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; root /var/www/md; index index.html; location / { }}
创立网址目录
[email protected]:~# mkdir -pv /var/www/md/[email protected]:~# cd /var/www/md/[email protected]:/var/www/md#
克隆我的项目
[email protected]:/var/www/md# git clone https://github.com/pandao/editor.md.gitCloning into 'editor.md'...remote: Enumerating objects: 2578, done.remote: Total 2578 (delta 0), reused 0 (delta 0), pack-reused 2578Receiving objects: 100% (2578/2578), 15.16 MiB | 7.84 MiB/s, done.Resolving deltas: 100% (1313/1313), done.[email protected]:/var/www/md#[email protected]:/var/www/md# mv editor.md/ editormd/
编写首页HTML
[email protected]:/var/www/md# vim index.html[email protected]:/var/www/md# cat index.html <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" href="editormd/css/editormd.css" /><div id="test-editor"> <textarea style="display:none;">### 对于 Editor.md**Editor.md** 是一款开源的、可嵌入的 Markdown 在线编辑器(组件),基于 CodeMirror、jQuery 和 Marked 构建。 </textarea></div><script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script><script src="editormd/editormd.js"></script><script type="text/javascript"> $(function() { var editor = editormd("test-editor", { // width : "100%", // height : "100%", path : "editormd/lib/" }); });</script>[email protected]:/var/www/md#
拜访地址
https://md.oiox.cn/
https://md.oiox.cn/editormd/e...
对于
https://www.oiox.cn/
https://www.oiox.cn/index.php...
CSDN、GitHub、知乎、开源中国、思否、掘金、简书、华为云、阿里云、腾讯云、哔哩哔哩、今日头条、新浪微博、集体博客
全网可搜《小陈运维》
文章次要公布于微信公众号