迁移回来了

This commit is contained in:
Cirrus83
2026-04-23 13:39:28 +08:00
commit 35aa1b3559
250 changed files with 17010 additions and 0 deletions
Executable
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# 静默启动:nohup command > output.log 2>&1 &
BLOG_DIR="$HOME/hugosite"
cd "$BLOG_DIR"
# 获取 IP 地址
IPV4=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}' | head -1)
IPV6=$(ifconfig | grep -E "broadcast|autoconf secured" | grep "inet6"| awk '{print $2}' | head -1)
echo "🌐 服务器信息:"
echo "IPv4: $IPV4"
echo "IPv6: $IPV6"
echo ""
echo "⚡ 启动 Hugo 服务器..."
echo "请稍等..."
# 启动服务器
hugo server \
-D \
--bind 0.0.0.0 \
--port 803 \
--baseURL "http://localhost:803/" \
--appendPort=false \
--disableFastRender \
--logLevel debug
# 如果上面命令阻塞,可以按 Ctrl+C 停止,然后使用后台运行:
# hugo server -D --bind 0.0.0.0 --port 1313 --baseURL "http://$IPV4:1313/" > /tmp/hugo.log 2>&1 &