summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile26
1 files changed, 19 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 462a001..0629863 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,22 @@
# Construye tu sitio web en texto-plano con Jekyll
-#
-# Para usar este makefile desde texto-plano.xyz corre make modificando el
-# comando del compilador:
-#
-# make JEKYLL=jekyll26
+# ------------------------------------------------
+BUILD_DIR = _site
+DEPLOY_DIR = $(HOME)/public_html
+RSYNC = rsync
+RSYNC_ARGS = -av
-JEKYLL := bundle exec jekyll
+# Determina qué comando utilizar para llamar a jekyll
+ifeq (, $(shell which jekyll26 2> /dev/null))
+ JEKYLL = bundle exec jekyll
+else
+ JEKYLL = jekyll26
+endif
-all:
+
+
+all: build
+
+build:
$(JEKYLL) build
serve:
@@ -15,3 +24,6 @@ serve:
clean:
$(JEKYLL) clean
+
+deploy: build $(DEPLOY_DIR)
+ $(RSYNC) $(RSYNC_ARGS) $(BUILD_DIR)/ $(DEPLOY_DIR)
Un proyecto texto-plano.xyz