text build

This commit is contained in:
2025-05-27 18:04:15 +03:00
parent 61f075ef41
commit 0880736b02
6 changed files with 845 additions and 57 deletions

View File

@@ -59,8 +59,22 @@ rm -rf public
# Compile Tailwind
echo "🧵 Building Tailwind CSS..."
# Create a backup of the original CSS file
cp css/index.css css/index.css.bak
# Generate the CSS file with Tailwind
./tailwindcss -i css/index.css -o static/css/index.css --minify
# Check if the generated CSS file is empty or very small
if [ ! -s static/css/index.css ] || [ $(wc -c < static/css/index.css) -lt 1000 ]; then
echo "⚠️ Warning: Generated CSS file is empty or very small. Using backup CSS file."
# If Tailwind fails to generate a proper CSS file, use a pre-generated one
cp css/index.css.bak static/css/index.css
fi
# Print the size of the generated CSS file
echo "📏 Generated CSS file size: $(du -h static/css/index.css | cut -f1)"
# Build Zola site
echo "🏗 Running Zola..."
zola --root "$ABS_DIR_OF_SCRIPT" build