|
|
@ -2,15 +2,35 @@ |
|
|
|
|
|
|
|
|
|
|
|
HUGO=hugo |
|
|
|
HUGO=hugo |
|
|
|
|
|
|
|
|
|
|
|
.PHONY: build serve |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
all: build |
|
|
|
all: build |
|
|
|
|
|
|
|
|
|
|
|
build: |
|
|
|
.PHONY: build |
|
|
|
$(HUGO) |
|
|
|
build: clean |
|
|
|
|
|
|
|
$(HUGO) --environment=production --minify --templateMetrics |
|
|
|
|
|
|
|
#@rm -rf public/feed.xml |
|
|
|
|
|
|
|
#@find public/*/posts/ -name 'feed.xml' -exec sh -c "cat {} >> public/feed.xml" \; |
|
|
|
@find public/ -name '*.html' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
@find public/ -name '*.html' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
|
|
|
|
@find public/ -name '*.xml' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
@find public/ -name '*.css' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
@find public/ -name '*.css' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
@find public/ -name '*.js' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
@find public/ -name '*.js' ! -name '*.gz' -type f -exec sh -c "gzip -c -9 < {} > {}.gz" \; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: test |
|
|
|
|
|
|
|
test: |
|
|
|
|
|
|
|
$(HUGO) --environment=development --minify |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: draft |
|
|
|
|
|
|
|
draft: |
|
|
|
|
|
|
|
$(HUGO) --environment=development --minify --buildDrafts --buildFuture --buildExpired |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: serve |
|
|
|
serve: |
|
|
|
serve: |
|
|
|
$(HUGO) server --disableFastRender |
|
|
|
$(HUGO) server --environment=development --noHTTPCache --disableFastRender --watch |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: servedraft |
|
|
|
|
|
|
|
servedraft: |
|
|
|
|
|
|
|
$(HUGO) server --environment=development --buildFuture --buildExpired --noHTTPCache --disableFastRender --watch |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean |
|
|
|
|
|
|
|
clean: |
|
|
|
|
|
|
|
@rm -rf public/ |
|
|
|
|
|
|
|
@rm -rf resource/ |
|
|
|