-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (37 loc) · 1.51 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# SPDX-FileCopyrightText: 2022 XMPP Providers Team
#
# SPDX-License-Identifier: AGPL-3.0-or-later
PY=python3
PIP=pip3
HUGO=hugo
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/public
TOOLSDIR=$(BASEDIR)/tools
BASEURL=https://providers.xmpp.net/
help:
@echo 'Makefile for a hugo website '
@echo ' '
@echo 'Usage: '
@echo ' make clean remove the generated files '
@echo ' make publish generate using production settings '
@echo ' make serve serve site at http://localhost:1313 '
@echo ' make serve-no-pip serve site at http://localhost:1313 without using PIP'
@echo ' '
clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
serve:
$(PIP) install --upgrade -r $(TOOLSDIR)/requirements.txt
$(PY) -m tools.run prepare_website
$(HUGO) version
$(HUGO) server --bind=0.0.0.0 --baseURL="http://localhost/" --buildFuture
serve-no-pip:
$(PY) -m tools.run prepare_website
$(HUGO) version
$(HUGO) server --bind=0.0.0.0 --baseURL="http://localhost/" --buildFuture
publish:
$(PIP) install --upgrade -r $(TOOLSDIR)/requirements.txt
$(PY) -m tools.run prepare_website
$(HUGO) version
$(HUGO) --baseURL=$(BASEURL)
.PHONY: help clean serve serve-no-pip publish