diff --git a/Makefile b/Makefile index a3f5929..e8b9409 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ PY?=python3 PELICAN?=pelican PELICANOPTS= +YEARSUBFOLDER= BASEDIR=$(CURDIR) INPUTDIR=$(BASEDIR)/content OUTPUTDIR=$(BASEDIR)/output @@ -13,7 +14,6 @@ FAKEDIR=../output/ SSH_HOST=Embrevade SSH_PORT=22 SSH_USER=sshcontent -SSH_TARGET_DIR=/var/www SSH_TARGET_DIR=/home/sshcontent/opytex.org/www/ RSYNC_EXCLUDE=--exclude "pymath" --exclude "opytex" --exclude "enseignements" @@ -23,7 +23,7 @@ ifeq ($(DEBUG), 1) PELICANOPTS += -D endif -RELATIVE ?= 0 +RELATIVE ?= 1 ifeq ($(RELATIVE), 1) PELICANOPTS += --relative-urls endif @@ -47,6 +47,7 @@ help: @echo ' ' html: + lessc $(BASEDIR)/theme/static/stylesheet/style.less $(BASEDIR)/theme/static/stylesheet/style.min.css -x $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) clean: @@ -80,16 +81,13 @@ endif publish: $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) -ssh_upload: publish - #scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) - scp -r $(OUTPUTDIR)/* $(SSH_HOST):$(SSH_TARGET_DIR) rsync_upload: publish #rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --cvs-exclude --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) rsync -e "ssh" -P -rvzc --delete $(RSYNC_EXCLUDE) $(OUTPUTDIR)/ $(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude fake_upload: html - mkdir -p $(FAKEDIR) - rsync -P -rvzc --delete $(RSYNC_EXCLUDE) $(OUTPUTDIR)/ $(FAKEDIR) --cvs-exclude + mkdir -p $(FAKEDIR)$(YEARSUBFOLDER) + rsync -P -rvzc --delete $(OUTPUTDIR)/ $(FAKEDIR)$(YEARSUBFOLDER) --cvs-exclude .PHONY: html help clean regenerate serve serve-global devserver publish ssh_upload rsync_upload