As developers and writers, we often need to use Markdown to write documents, blogs, and technical papers. However, the standard Markdown format may seem a bit ordinary and lack some professional typesetting effects. Here, we will introduce you to a powerful tool - Markdown Nice (mdnice), which can help you easily add beautiful typography effects to your Markdown documents.
Github address: https://github.com/mdnice/markdown-nice
gitee address: https://gitee.com/zhning12/markdown-nice
Online address: https://editor.mdnice.com/
Blogger’s online address: http://mdnice.xiuji.mynatapp.cc/
Introduction
An open source node project that supports custom-style Markdown editor. The functions are as follows:
- Markdown editor that supports custom styles
- Support WeChat public account typesetting
- Supports a series of platforms such as Zhihu, Rare Earth Nuggets, Blog Park and CSDN
- Content and custom styles are saved in real time in the browser
- Supports uploading images, footnotes, and formulas
deploy
Step 1: Download Project
We first download the project from github to our server
Step 2: Build the image
Write the Dockerfile file in the same directory of the project
Dockerfile
# 使用官方Node.js运行时环境作为基础镜像
FROM xj/nodepython:14.16.0-p2
# 维护者信息
MAINTAINER "xj"
# 将项目文件复制到镜像的工作目录中
COPY markdown-nice /app
# 切换工作目录
WORKDIR /app
# 安装项目依赖
RUN npm install
# 暴露容器的HTTP端口
EXPOSE 3000
# 设置启动命令
CMD ["npm", "run", "start"]
Build the image in the same directory as Dockerfile
docker build -t xj/mdnice:2.0 .
After the build is successful, you can use the following command to view the built image
docker images | grep mdnice
Step 3: Write docker-compose.yml file
docker-compose.yml
version: '3.3'
services:
mdnice:
image: xj/mdnice:2.0
restart: always
ports:
- "8010:3000"
Step 4: Start the project
Execute the following command in the same directory as docker-compose.yml:
docker-compose up -d
View log
docker-compose logs -f
If there are no problems, the project has already been started.
Function Description
Let’s talk about some of the features I like more specifically:
- Export function
- theme
- code theme
- local history feature
- Copy and preview functionality
Our set of articles in markdown format can be copied to public accounts, Zhihu, Nuggets and other blog platforms at the same time, and the preview can also be switched to two different modes: mobile phone and computer.
Summarize
Markdown Nice is a powerful tool that allows you to easily convert ordinary Markdown documents into HTML format with beautiful typography. With simple command line operations, you can choose different layout styles and themes to add a professional look to your documents. Whether you are writing blogs, technical papers or documentation, Markdown Nice is a tool worth trying.
I hope this article can help you understand Markdown Nice and successfully deploy it, making your Markdown documents even better!