########## contents ALL_MDS = $(shell git ls-files | grep '\.md$$') # a first, quick and dirty approach is to publish right # in /var/www/html so there's no impact on the httpd config # of course we might have to isolate this underneath at some point PUBLISH_PATH = /var/www/html #ALL_PLUGINS = plugins/*.{js,css,html} ########## default target all: preview preview: prepare index meta convert # this is what is invoked by restart-website.sh that is crontab'ed install: preview publish .PHONY: all preview publish install prepare index meta convert preview_and_nepiall: prepare index meta nepi_all convert install_and_nepiall: preview_and_nepiall publish .PHONY: preview_and_nepiall install_and_nepiall ########## global vars # I am using the custom-made 'nepi' layout # which was 'exported' (copied) from markdown-styles' 'bootstrap3' LAYOUT = ./nepi-layout ########## prepare: @[ -d markdown ] || mkdir markdown rsync -av --delete --relative $(ALL_MDS) markdown # index.py is hard-wired to output in markdown/ index: @[ -d markdown ] || mkdir markdown export LC_ALL=en_US.UTF-8; ./index.py $(ALL_MDS) # likewise meta: @[ -d markdown ] || mkdir markdown ./meta.py ################################ # compile status informations by Nepi check status: @[ -d markdown ] || mkdir markdown ./status.py convert: generate-md --layout $(LAYOUT) --input markdown --output html # default is to publish locally as this runs right from nepi-newpl.sophia.inria.fr publish: rsync -av --delete html/ $(PUBLISH_PATH)/ debug: echo ALL_MDS=$(ALL_MDS) clean: rm -rf markdown html