aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJulien Dessaux2021-09-12 14:03:45 +0200
committerJulien Dessaux2021-09-12 14:03:45 +0200
commit3bba78a22c4a3c31a936bbcec954420ce1776776 (patch)
treea11c0e22d3c76e9ea5650f307b38a87b9d1bfa55 /Makefile
parentRemove subtitles from the index.json since I do not use those (diff)
downloadwww-3bba78a22c4a3c31a936bbcec954420ce1776776.tar.gz
www-3bba78a22c4a3c31a936bbcec954420ce1776776.tar.bz2
www-3bba78a22c4a3c31a936bbcec954420ce1776776.zip
Implemented search functionality
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0465a3e..4aa77b3 100644
--- a/Makefile
+++ b/Makefile
@@ -5,10 +5,14 @@ DESTDIR=public/
build: ## make build # builds an optimized version of the website in $(DESTDIR)
@echo "----- Generating site -----"
hugo --gc --minify --cleanDestinationDir -d $(DESTDIR) --cacheDir $(CACHEDIR)
+ cp public/index.json search/
+ cp public/search/index.html search/
+ (cd search && CGO_ENABLED=0 go build -ldflags '-s -w -extldflags "-static"' ./search.go)
.PHONY: clean
clean: ## make clean # removed all $(DESTDIR) contents
@echo "----- Cleaning old build -----"
+ rm -f search/index.html search/index.json search/search
cd $(DESTDIR) && rm -rf *
.PHONY: serve