用 marknb 替换 Python markdown,并添加一键安装与升级脚本。
部署时通过 install.sh 自动编译 marknb;日常更新用 upgrade.sh 拉代码并重编译。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# 一键安装 py-blog 依赖:编译 marknb 动态库 + Python venv
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
# shellcheck source=common.sh
|
||||
source "$ROOT/scripts/common.sh"
|
||||
|
||||
echo "==> 安装系统构建依赖(如有 apt)"
|
||||
apt_install
|
||||
|
||||
echo "==> 拉取并编译 marknb → $LIB_PATH"
|
||||
build_marknb
|
||||
|
||||
echo "==> 安装 Python 依赖到 venv"
|
||||
install_python
|
||||
|
||||
echo ""
|
||||
echo "安装完成。"
|
||||
echo " marknb: $LIB_PATH"
|
||||
echo " 启动: source venv/bin/activate && python blog.py"
|
||||
Reference in New Issue
Block a user