-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathMakefile
28 lines (22 loc) · 972 Bytes
/
Makefile
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
PREVIEW_DEST:=$(if $(PREVIEW_DEST),$(PREVIEW_DEST),/tmp/__specs.scientific-python.org_site-preview)
HUGO_OPTS=--disableFastRender
.PHONY: clean preview prepare-preview preview
.DEFAULT_GOAL: preview-serve
# Substitute the SPECs in specs.scientific-python.org with
# those from this repository
prepare-preview: clean
mkdir -p $(PREVIEW_DEST)
git clone https://github.com/scientific-python/scientific-python.org $(PREVIEW_DEST)
git -C $(PREVIEW_DEST) submodule set-url themes/scientific-python-hugo-theme https://github.com/scientific-python/scientific-python-hugo-theme.git
git -C $(PREVIEW_DEST) submodule update --init
rm -rf $(PREVIEW_DEST)/content/specs/*
cp -r * $(PREVIEW_DEST)/content/specs
# Serve SPECs to http://localhost:1313
preview-serve: prepare-preview
cd $(PREVIEW_DEST) && make serve
# Build website to $(PREVIEW_DEST)/public
preview-build: prepare-preview
cd $(PREVIEW_DEST) && make html
clean:
rm -rf $(PREVIEW_DEST)
.PHONY: clean preview