huhan3000/scripts/start_local_docs_server.sh

20 lines
579 B
Bash

#!/bin/bash
# 胡汉三千年项目 - 本地文档服务器启动脚本
# Hu-Han Three Thousand Years Project - Local Documentation Server
echo "🚀 启动胡汉三千年项目文档服务..."
# 检查文档是否已构建
if [ ! -d "documentation/sphinx-docs/_build/html" ]; then
echo "📚 文档未构建,正在构建..."
./build_docs.sh
fi
# 启动本地服务器
echo "🌐 启动本地Web服务器..."
echo "📖 文档地址: http://localhost:8080"
echo "🛑 按 Ctrl+C 停止服务器"
cd documentation/sphinx-docs/_build/html
python3 -m http.server 8080