#!/bin/bash set -e echo "๐Ÿงน Cleaning build folders..." rm -rf public static/css echo "โฌ‡๏ธ Downloading TailwindCSS CLI..." if [[ -f "tailwindcss.exe" ]]; then rm tailwindcss.exe fi ASSET="tailwindcss-windows-x64.exe" curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.17/${ASSET}" mv ${ASSET} tailwindcss.exe chmod +x tailwindcss.exe # Ensure correct config if [[ ! -f "tailwind.config.js" ]]; then echo "โš™๏ธ Creating tailwind.config.js" echo "module.exports = { content: ['./templates/**/*.html'], theme: { extend: {} }, plugins: [], }" > tailwind.config.js fi # Build Tailwind CSS echo "๐ŸŽจ Building Tailwind CSS..." ./tailwindcss.exe -i css/index.css -o static/css/index.css --minify if [[ ! -f "static/css/index.css" ]]; then echo "โŒ Tailwind CSS not generated." exit 1 fi echo "โœ… Tailwind CSS built at static/css/index.css" # Build Zola site echo "๐Ÿ—๏ธ Building site with Zola..." zola build # Final check if [[ -f "public/css/index.css" ]]; then echo "โœ… CSS successfully copied to public/" else echo "โŒ CSS NOT copied to public/. Check Zola static settings." fi