Implemented search functionality
This commit is contained in:
parent
ee235ae70b
commit
3bba78a22c
8 changed files with 251 additions and 1 deletions
4
Makefile
4
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue