summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHorus32016-10-22 12:20:46 +0200
committerHorus32016-10-22 12:20:46 +0200
commit6c577a65339ac597ac622fb839393f931562cf8e (patch)
tree04d56b6a7f3e0783d391e614d2c09e813dc2919f /Makefile
parentc15893f16dcc694db3b064a77272d9c0da9be2c1 (diff)
downloadiamfabulous.de-6c577a65339ac597ac622fb839393f931562cf8e.tar.gz
Fix the projects page, improves the piwik script, concats the assets with gulp and styles the 404 template.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3dcfa83..639a59e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,17 @@
all: clean build
build: clean
- cd static && cat normalize.css skeleton.css font.css custom.css > concat.css
- gulp
- HUGO_TEST= hugo --ignoreCache --log=true --logFile=./log/hugo.log --verbose=false 1>/dev/null
+ @# Concat all CSS files
+ gulp concat
+ @# Build the HTML the first time to be ...
+ HUGO_GULP=0 hugo --ignoreCache --log=true --logFile=./log/hugo.log --verbose=false 1>/dev/null
+ @# ... spidered by uncss to remove the unnecessary selector rules.
+ gulp uncss
+ @# Builds the site again, but this time the minified CSS will be inlined by Hugo.
+ HUGO_GULP=1 hugo --ignoreCache --log=true --logFile=./log/hugo.log --verbose=false 1>/dev/null
+ @# Minifies the HTML!
gulp minifyhtml
+ @# Cleans up.
rm -rf public/gulp.css/
rm -f public/*.css
@@ -20,6 +27,7 @@ index:
cat public/index.html
deploy: clean build
+ @# Deploy to the server!
if [ -d /var/www/www.iamfabulous.de ]; then\
( rsync --delete -avz public/ /var/www/www.iamfabulous.de/ 1>/dev/null 2>/dev/null && \
echo "Success: Site www.iamfabulous.de was built.") || ./error.sh; \