forked from scientific-python/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
27 lines (21 loc) · 921 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
PREVIEW_DEST:=$(if $(PREVIEW_DEST),$(PREVIEW_DEST),/tmp/__scientific-python.org_site-preview)
HUGO_OPTS=--disableFastRender
.PHONY: clean preview prepare-preview preview
.DEFAULT_GOAL: preview-serve
# Substitute the SPECs in 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
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