forked from leonidk/leonidk.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 948 Bytes
/
Makefile
File metadata and controls
34 lines (27 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PELICAN = pelican
PELICANOPTS =
INPUTDIR = content
OUTPUTDIR = output
CONFFILE = pelicanconf.py
PUBLISHCONF = publishconf.py
help:
@echo 'Makefile for a Pelican Web Site'
@echo ''
@echo 'Usage:'
@echo ' make html (re)generate the site'
@echo ' make clean remove the generated files'
@echo ' make serve serve the site locally on port 8000'
@echo ' make devserver auto-reload on changes (port 8000)'
@echo ' make github deploy to GitHub Pages (gh-pages branch)'
html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
serve:
cd $(OUTPUTDIR) && python3 -m http.server 8000
devserver:
$(PELICAN) --listen --autoreload $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE)
github: html
ghp-import -m "Publish site" -b gh-pages $(OUTPUTDIR)
git push origin gh-pages
.PHONY: html clean serve devserver github