cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

76b13a60384cfe88c0837e1b9f0347f0f250753f

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2025-03-21T03:25:41Z

minify css before building site
 build.sh | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/build.sh b/build.sh
index aabf154..537954a 100755
--- a/build.sh
+++ b/build.sh
@@ -9,10 +9,10 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then
     # Check if the environment flag is set to PROD
     if [[ "$ENV" == "prod" ]]; then
         echo "Environment: Production"
-        
+
         # Check if publishing via LAN or remotely
         printf "Publishing on remote or LAN? [r|l] "
-        
+
         # Update ubuntu_server variable based on answer
         read method
         if [[ "$method" =~ ^[Rr]$ ]]; then
@@ -23,30 +23,30 @@ if [[ "$answer" =~ ^[Yy]$ ]]; then
             echo "Invalid input. Assuming LAN (ubuntu)"
             ubuntu_server="ubuntu"
         fi
-        
+
         # Remove previous build
         rm -rf .build/*
-        
-        # Run publishing script
-        emacs --script publish.el &>/dev/null
-        
+
         # Minify CSS
         minify -o theme/static/styles.min.css theme/static/styles.css
-        
+
+        # Run publishing script
+        emacs --script publish.el &>/dev/null
+
         # Deploy changes
         rsync -r --delete-before .build/* $ubuntu_server:/var/www/cmc.pub/
     else
         echo "Environment: Development"
-        
+
         # Remove previous build
         rm -rf .build/*
-        
-        # Run publishing script
-        emacs --script publish.el
-        
+
         # Minify CSS
         minify -o theme/static/styles.min.css theme/static/styles.css
 
+        # Run publishing script
+        emacs --script publish.el
+
         # Launch development web server
         cd .build/
         python3 -m http.server