搭建程序员做饭指南
程序员做饭指南看起来不错就随手搭建了一个,没想到在win系统搭建需要装Microsoft Visual Studio等生成工具,然后改用服务器部署
服务器环境:Alibaba Cloud 3+Python3.12.4+Nodejs_v22.12.0+Npm10.9.0+Pip25.0.1
Docker部署
docker pull ghcr.io/anduin2017/how-to-cook:latest
docker run -d -p 5000:5000 ghcr.io/anduin2017/how-to-cook:latest
手动部署:
# npm
npm install
npm run build
npm run lint
# python
apt-get update && apt-get install -y weasyprint fonts-noto-cjk wget unzip
# centos
# yum install pango langpacks-core-font-zh_CN.noarch
pip install -r requirements.txt
mkdocs build
坑点:
- 缺少lib包安装pango解决
yum insttall pango - 生成pdf汉字不显示
cp NotoSansSC-Regular.ttf /usr/share/fonts/chinese/ fc-cache -fv
以下方法安装字体未验证
# 搜索当前字体
# yum search font chinese
# 安装字体
yum install langpacks-core-font-zh_CN.noarch
演示:https://file.alonesky.com/plugin/HowToCook