add hugo extended
parent
3b5326f4b1
commit
db8c799707
10
Dockerfile
10
Dockerfile
|
|
@ -1,2 +1,10 @@
|
|||
FROM golang as build
|
||||
|
||||
ENV GOPATH=/go
|
||||
ENV GOBIN=/go/bin
|
||||
COPY . /go/src/blog
|
||||
WORKDIR /go/src/blog
|
||||
RUN make public
|
||||
|
||||
FROM nginx
|
||||
COPY ./public /usr/share/nginx/html
|
||||
COPY --from=build /go/src/blog/public /usr/share/nginx/html
|
||||
6
makefile
6
makefile
|
|
@ -9,7 +9,7 @@ serve: assets
|
|||
new-post:
|
||||
@./hugo new posts/$(TITLE).md
|
||||
|
||||
build: public
|
||||
build:
|
||||
docker build -t vdhsn/blog:${VERSION} -f Dockerfile .
|
||||
|
||||
publish: clean build
|
||||
|
|
@ -38,7 +38,7 @@ $(OPENRING_BIN):
|
|||
@go get -u git.sr.ht/~sircmpwn/openring
|
||||
|
||||
./assets/css/syntax.css: $(HUGO_BIN)
|
||||
hugo gen chromastyles --style=solarized-dark256 > assets/css/syntax.css
|
||||
$(HUGO_BIN) gen chromastyles --style=solarized-dark256 > assets/css/syntax.css
|
||||
|
||||
./layouts/partials/openring.out.html: $(OPENRING_BIN)
|
||||
$(OPENRING_BIN) \
|
||||
|
|
@ -50,5 +50,5 @@ $(OPENRING_BIN):
|
|||
> ./layouts/partials/openring.out.html
|
||||
|
||||
public: ./assets/css/syntax.css ./layouts/partials/openring.out.html $(HUGO_BIN)
|
||||
hugo --minify --gc
|
||||
$(HUGO_BIN) --minify --gc
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue