6 INPUTDIR=$(BASEDIR)/content
7 OUTPUTDIR=$(BASEDIR)/output
8 CONFFILE=$(BASEDIR)/pelicanconf.py
9 PUBLISHCONF=$(BASEDIR)/publishconf.py
18 PELICANOPTS += --relative-urls
22 @echo 'Makefile for a pelican Web site '
25 @echo ' make html (re)generate the web site '
26 @echo ' make clean remove the generated files '
27 @echo ' make regenerate regenerate files upon modification '
28 @echo ' make publish generate using production settings '
29 @echo ' make serve [PORT=8000] serve site at http://localhost:8000'
30 @echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
31 @echo ' make devserver [PORT=8000] serve and regenerate together '
32 @echo ' make git-publish upload the web site via git '
33 @echo ' make rsync-publish upload the web site via rsync+ssh '
35 @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
36 @echo 'Set the RELATIVE variable to 1 to enable relative urls '
40 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
43 git worktree remove -f output || true
44 rm -rf __pycache__ output
47 $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
51 $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
53 $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
58 $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER)
60 $(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0
66 $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
68 $(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
72 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
75 git log output -- >/dev/null 2>&1 || git checkout --orphan output
76 git log output -- >/dev/null 2>&1 || git commit --allow-empty -m "empty output Branch" --only
78 git worktree add -f $(OUTPUTDIR) output
79 $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
80 cd $(OUTPUTDIR) && pwd && git add . && git commit -m "make git-publish build `date -Isec`" --only . && git push --force --set-upstream origin output || true
83 # $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
84 # rsync -e "ssh -p 22" -rvcP --chmod=a=rX --delete $(OUTPUTDIR)/ user@example.com:/var/www/vhost/
87 pip3 install --user --upgrade -r requirements.txt
89 .PHONY: html help clean regenerate serve serve-global devserver publish rsync_upload install-req