-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·44 lines (36 loc) · 953 Bytes
/
build.sh
File metadata and controls
executable file
·44 lines (36 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -e
echo "🚀 Building Rustun Website..."
# Check if Hugo is installed
if ! command -v hugo &> /dev/null; then
echo "❌ Hugo is not installed."
echo ""
echo "Please install Hugo first:"
echo " macOS: brew install hugo"
echo " Linux: sudo apt install hugo (or use package manager)"
echo " Windows: choco install hugo-extended"
echo ""
echo "Or download from: https://github.com/gohugoio/hugo/releases"
exit 1
fi
# Show Hugo version
echo "📦 Hugo version:"
hugo version
# Clean previous build
if [ -d "public" ]; then
echo "🧹 Cleaning previous build..."
rm -rf public
fi
# Build the site
echo "🔨 Building site..."
hugo --minify
# Show build info
echo ""
echo "✅ Build complete!"
echo "📁 Output directory: ./public"
echo ""
echo "To preview locally:"
echo " cd public && python3 -m http.server 8000"
echo ""
echo "Or run development server:"
echo " hugo server -D"