You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 KiB

VERSION := $(shell git rev-parse --abbrev-ref HEAD)
GOBIN = $(shell go env GOPATH)/bin
.PHONY: serve
serve: assets
@hugo server -D --log -w --bind
.PHONY: new-post
@hugo new posts/$(TITLE).md
.PHONY: build
docker build -t vdhsn/blog:${VERSION} -f Dockerfile .
.PHONY: clean build
publish: clean build
docker push vdhsn/blog:${VERSION}
.PHONY: test-publish
test-publish: build
docker run -it -p 8080:80 vdhsn/blog:${VERSION}
.PHONY: clean
@rm -rf ./public ./resources ./themes ./assets/css/syntax.* ./layouts/partials/single/footer.html
OPENRING_BIN = $(GOBIN)/openring
go install
public: ./themes/lines/config.toml ./assets/css/syntax.light.css ./assets/css/syntax.dark.css ./layouts/partials/single/footer.html
hugo --verbose --gc --minify --templateMetrics --templateMetricsHints --enableGitInfo --environment production
@git submodule update --init
@mkdir -p ./assets/css
./assets/css/syntax.light.css: $(HUGO_BIN) ./assets/css
@hugo gen chromastyles --style=github > assets/css/syntax.light.css
./assets/css/syntax.dark.css: $(HUGO_BIN) ./assets/css
@hugo gen chromastyles --style=github-dark > assets/css/syntax.dark.css
./layouts/partials/single/footer.html: $(OPENRING_BIN)
@mkdir -p ./layouts/partials/single/
-s \
-s \
-s \
-s \
< ./assets/ \
> ./layouts/partials/single/footer.html