Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

28.7. pandoc-mermaid-filter

		
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. "$HOME/.nvm/nvm.sh"

npm install --global mermaid-filter @mermaid-js/mermaid-cli
		
		

		
[root@netkiller test]# pandoc -t html -F mermaid-filter -o example.html example.md
		
		

		
pandoc input.md -o output.docx --filter mermaid-filter		
		
		

自定义安装 chromium

		
[root@development test]# dnf install chromium

[root@development test]# rpm -ql chromium | grep bin
/usr/bin/chromium-browser

PUPPETEER_SKIP_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser \
MMDC_ARGS="--no-sandbox" \
pandoc test.md -F mermaid-filter -o test.html